We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 362dd85 commit 9ee6907Copy full SHA for 9ee6907
1 file changed
app/settings/integrations/page.tsx
@@ -169,9 +169,13 @@ export default function IntegrationsSettings() {
169
throw new Error('GitHub OAuth not configured. Please check environment variables.')
170
}
171
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
+
176
const config: GitHubOAuthConfig = {
177
clientId: process.env.NEXT_PUBLIC_GITHUB_CLIENT_ID,
- redirectUri: `${window.location.origin}/api/auth/github`,
178
+ redirectUri: redirectUri,
179
scopes: getGitHubScopes(),
180
181
@@ -546,4 +550,4 @@ export default function IntegrationsSettings() {
546
550
</Card>
547
551
</div>
548
552
)
549
-}
553
+}
0 commit comments