Merge pull request #28892 from benjidotsh/auth/bitbucket-persist

feat(auth): enable persistency of scopes for Bitbucket Cloud
This commit is contained in:
Vincenzo Scamporlino
2025-03-27 22:13:21 +01:00
committed by GitHub
6 changed files with 17 additions and 3 deletions
@@ -28,6 +28,7 @@ export const bitbucketAuthenticator = createOAuthAuthenticator({
PassportOAuthAuthenticatorHelper.defaultProfileTransform,
scopes: {
required: ['account'],
persist: true,
},
initialize({ callbackUrl, config }) {
const clientID = config.getString('clientId');
@@ -73,6 +73,7 @@ describe('authModuleBitbucketProvider', () => {
expect(decodeOAuthState(startUrl.searchParams.get('state')!)).toEqual({
env: 'development',
nonce: decodeURIComponent(nonceCookie.value),
scope: 'account',
});
});
});