Merge pull request #6644 from JosiahCraw/feature/add-disableRefresh-config-for-oauth2
Feature/add disable refresh config for oauth2
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-auth-backend': minor
|
||||
---
|
||||
|
||||
Added the disableRefresh option to the OAuth2 config
|
||||
@@ -177,6 +177,8 @@ export const createOAuth2Provider = (
|
||||
const authorizationUrl = envConfig.getString('authorizationUrl');
|
||||
const tokenUrl = envConfig.getString('tokenUrl');
|
||||
const scope = envConfig.getOptionalString('scope');
|
||||
const disableRefresh =
|
||||
envConfig.getOptionalBoolean('disableRefresh') ?? false;
|
||||
|
||||
const provider = new OAuth2AuthProvider({
|
||||
clientId,
|
||||
@@ -188,7 +190,7 @@ export const createOAuth2Provider = (
|
||||
});
|
||||
|
||||
return OAuthAdapter.fromConfig(globalConfig, provider, {
|
||||
disableRefresh: false,
|
||||
disableRefresh: disableRefresh,
|
||||
providerId,
|
||||
tokenIssuer,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user