fix(auth): use default scope account for Bitbucket auth
Fixes https://github.com/backstage/backstage/issues/22383 The scope `team` does not exist, a list of valid OAuth2 scopes can be found here: - https://developer.atlassian.com/cloud/bitbucket/rest/intro/#bitbucket-oauth-2-0-scopes The `passport-bitbucket-oauth2` package implementing OAuth2 for Bitbucket under the hood uses the `/2.0/user` API to retrieve the user information, which requires the `account` scope: - https://developer.atlassian.com/cloud/bitbucket/rest/api-group-users/#api-user-get - https://github.com/bithound/passport-bitbucket-oauth2/blob/master/lib/passport-bitbucket/strategy.js#L60 Signed-off-by: Martin Ohmann <martin.ohmann@bonial.com>
This commit is contained in:
@@ -224,7 +224,7 @@ export const apis = [
|
||||
configApi,
|
||||
discoveryApi,
|
||||
oauthRequestApi,
|
||||
defaultScopes: ['team'],
|
||||
defaultScopes: ['account'],
|
||||
environment: configApi.getOptionalString('auth.environment'),
|
||||
}),
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user