Fix URL for staging stack (#7030)

This commit is contained in:
chuckbutkus 2025-02-28 17:32:52 -05:00 committed by GitHub
parent 4502b009c2
commit 5378932017
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,7 +10,7 @@ export const generateGitHubAuthUrl = (clientId: string, requestUrl: URL) => {
.replace("https://", "")
.replace("http://", "");
const authUrl = baseUrl
.replace(/(^|\.)staging\.all-hands\.dev$/, ".auth.staging.all-hands.dev")
.replace(/(^|\.)staging\.all-hands\.dev$/, "$1auth.staging.all-hands.dev")
.replace(/(^|\.)app\.all-hands\.dev$/, "auth.app.all-hands.dev");
const scope = "openid email profile";
return `https://${authUrl}/realms/allhands/protocol/openid-connect/auth?client_id=github&response_type=code&redirect_uri=${encodeURIComponent(redirectUri)}&scope=${encodeURIComponent(scope)}`;