fixing refresh token okta provider

Signed-off-by: Carlo Giuseppe Sergi <carlo.sergi@klarna.com>
This commit is contained in:
Carlo Giuseppe Sergi
2021-12-24 14:22:03 +01:00
parent 5284458e18
commit a9abafa9df
2 changed files with 13 additions and 6 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-auth-backend': patch
---
Fixed bug on refresh token on Okta provider, now it gets the refresh token and it sends it into providerInfo
@@ -148,11 +148,12 @@ export class OktaAuthProvider implements OAuthHandlers {
}
async refresh(req: OAuthRefreshRequest): Promise<OAuthResponse> {
const { accessToken, params } = await executeRefreshTokenStrategy(
this._strategy,
req.refreshToken,
req.scope,
);
const { accessToken, refreshToken, params } =
await executeRefreshTokenStrategy(
this._strategy,
req.refreshToken,
req.scope,
);
const fullProfile = await executeFetchUserProfileStrategy(
this._strategy,
@@ -163,7 +164,7 @@ export class OktaAuthProvider implements OAuthHandlers {
fullProfile,
params,
accessToken,
refreshToken: req.refreshToken,
refreshToken,
});
}
@@ -176,6 +177,7 @@ export class OktaAuthProvider implements OAuthHandlers {
accessToken: result.accessToken,
scope: result.params.scope,
expiresInSeconds: result.params.expires_in,
refreshToken: result.refreshToken,
},
profile,
};