File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
app/settings/integrations Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -169,9 +169,13 @@ export default function IntegrationsSettings() {
169169 throw new Error ( 'GitHub OAuth not configured. Please check environment variables.' )
170170 }
171171
172+ const redirectUri = process . env . NEXT_PUBLIC_SITE_URL
173+ ? `${ process . env . NEXT_PUBLIC_SITE_URL } /api/auth/github`
174+ : `${ window . location . origin } /api/auth/github`
175+
172176 const config : GitHubOAuthConfig = {
173177 clientId : process . env . NEXT_PUBLIC_GITHUB_CLIENT_ID ,
174- redirectUri : ` ${ window . location . origin } /api/auth/github` ,
178+ redirectUri : redirectUri ,
175179 scopes : getGitHubScopes ( ) ,
176180 }
177181
@@ -546,4 +550,4 @@ export default function IntegrationsSettings() {
546550 </ Card >
547551 </ div >
548552 )
549- }
553+ }
You can’t perform that action at this time.
0 commit comments