feat(auth): enable persistency of scopes for Bitbucket Cloud
Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-auth-backend-module-bitbucket-provider': patch
|
||||
---
|
||||
|
||||
Enabled persistency of scopes for Bitbucket Cloud.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/integration-react': patch
|
||||
---
|
||||
|
||||
Added scopes `project` and `repository:admin` for Bitbucket Cloud.
|
||||
@@ -239,11 +239,13 @@ export class ScmAuth implements ScmAuthApi {
|
||||
'pullrequest',
|
||||
'snippet',
|
||||
'issue',
|
||||
'project',
|
||||
];
|
||||
const repoWriteScopes = options?.scopeMapping?.repoWrite ?? [
|
||||
'pullrequest:write',
|
||||
'snippet:write',
|
||||
'issue:write',
|
||||
'repository:admin',
|
||||
];
|
||||
return new ScmAuth('bitbucket', bitbucketAuthApi, host, {
|
||||
default: defaultScopes,
|
||||
|
||||
@@ -28,6 +28,7 @@ export const bitbucketAuthenticator = createOAuthAuthenticator({
|
||||
PassportOAuthAuthenticatorHelper.defaultProfileTransform,
|
||||
scopes: {
|
||||
required: ['account'],
|
||||
persist: true,
|
||||
},
|
||||
initialize({ callbackUrl, config }) {
|
||||
const clientID = config.getString('clientId');
|
||||
|
||||
Reference in New Issue
Block a user