diff --git a/.changeset/nice-dancers-explain.md b/.changeset/nice-dancers-explain.md new file mode 100644 index 0000000000..5e54a66c05 --- /dev/null +++ b/.changeset/nice-dancers-explain.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend-module-github-provider': patch +--- + +Fixed a bug where the GitHub authenticator did not properly persist granted OAuth scopes. diff --git a/plugins/auth-backend-module-github-provider/src/authenticator.ts b/plugins/auth-backend-module-github-provider/src/authenticator.ts index f59ac3d727..4a9710d114 100644 --- a/plugins/auth-backend-module-github-provider/src/authenticator.ts +++ b/plugins/auth-backend-module-github-provider/src/authenticator.ts @@ -28,6 +28,7 @@ const ACCESS_TOKEN_PREFIX = 'access-token.'; export const githubAuthenticator = createOAuthAuthenticator({ defaultProfileTransform: PassportOAuthAuthenticatorHelper.defaultProfileTransform, + shouldPersistScopes: true, initialize({ callbackUrl, config }) { const clientId = config.getString('clientId'); const clientSecret = config.getString('clientSecret');