update provider for changes in review and update changeset message

Signed-off-by: Joe Patterson <jrwpatterson@gmail.com>
This commit is contained in:
Joe Patterson
2022-09-08 20:33:54 +10:00
parent 3db53bbfa3
commit 018b7ec1f3
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -2,4 +2,4 @@
'@backstage/plugin-auth-backend': minor
---
Converts the auth0 to the passport-auth0 package and allows the addition of audience to auth0 connections this means that you can connect to the correct API to get permissions, access tokens and full profile
The auth0 integration is updated to use the passport-auth0 library. The configuration under auth.providers.auth0.* now supports an optional audience parameter; providing that allows you to connect to the correct API to get permissions, access tokens, and full profile information.
@@ -70,7 +70,7 @@ export class Auth0AuthProvider implements OAuthHandlers {
* so that the 'state' parameter of the oauth2 flow can be stored.
* This implementation of StateStore matches the NullStore found within
* passport-oauth2, which is the StateStore implementation used when options.state = false,
* allowing us to avoid using express-session in order to integrate with Okta.
* allowing us to avoid using express-session in order to integrate with auth0.
*/
private store: StateStore = {
store(_req: express.Request, cb: any) {
@@ -126,7 +126,7 @@ export class Auth0AuthProvider implements OAuthHandlers {
prompt: 'consent',
scope: req.scope,
state: encodeState(req.state),
audience: this.audience as string,
...(this.audience ? { audience: this.audience } : {}),
});
}
@@ -135,7 +135,7 @@ export class Auth0AuthProvider implements OAuthHandlers {
OAuthResult,
PrivateInfo
>(req, this._strategy, {
audience: this.audience as string,
...(this.audience ? { audience: this.audience } : {}),
});
return {