diff --git a/.changeset/pretty-feet-explode.md b/.changeset/pretty-feet-explode.md index c5cf0beb00..46237068c5 100644 --- a/.changeset/pretty-feet-explode.md +++ b/.changeset/pretty-feet-explode.md @@ -2,4 +2,4 @@ '@backstage/plugin-auth-backend': patch --- -Allow users to override callback url of Github provider +Allow users to override callback url of GitHub provider diff --git a/plugins/auth-backend/src/providers/github/provider.ts b/plugins/auth-backend/src/providers/github/provider.ts index 8abd4c76ea..41d08b9230 100644 --- a/plugins/auth-backend/src/providers/github/provider.ts +++ b/plugins/auth-backend/src/providers/github/provider.ts @@ -223,9 +223,8 @@ export const createGithubProvider = ( const enterpriseInstanceUrl = envConfig.getOptionalString( 'enterpriseInstanceUrl', ); - const customCallbackUrl = envConfig.getOptionalString( - 'customCallbackUrl', - ); + const customCallbackUrl = + envConfig.getOptionalString('customCallbackUrl'); const authorizationUrl = enterpriseInstanceUrl ? `${enterpriseInstanceUrl}/login/oauth/authorize` : undefined; @@ -235,8 +234,9 @@ export const createGithubProvider = ( const userProfileUrl = enterpriseInstanceUrl ? `${enterpriseInstanceUrl}/api/v3/user` : undefined; - const callbackUrl = customCallbackUrl || - `${globalConfig.baseUrl}/${providerId}/handler/frame`; + const callbackUrl = + customCallbackUrl || + `${globalConfig.baseUrl}/${providerId}/handler/frame`; const catalogIdentityClient = new CatalogIdentityClient({ catalogApi,