diff --git a/src/components/SettingsBar.tsx b/src/components/SettingsBar.tsx index 6349a8b..cc7af13 100644 --- a/src/components/SettingsBar.tsx +++ b/src/components/SettingsBar.tsx @@ -232,9 +232,14 @@ export default class SettingsBar extends React.PureComponent { {!hasAccessToken && ( { + // use js here to make sure redirect_uri is latest url + const url = `https://github.com/login/oauth/authorize?client_id=${ + oauth.clientId + }&scope=repo&redirect_uri=${encodeURIComponent(window.location.href)}` + window.location.href = url + }} > Create with OAuth