feat: auth0 strategy - add additional organization query params to authorizationParams
Signed-off-by: Jack Palmer <jackpalmer@spotify.com>
This commit is contained in:
@@ -2,4 +2,4 @@
|
||||
'@backstage/plugin-auth-backend-module-auth0-provider': minor
|
||||
---
|
||||
|
||||
Set invitation query parameter as authorizationParam when present
|
||||
feat: Add support for organizational invites in auth0 strategy
|
||||
@@ -51,15 +51,16 @@ export class Auth0Strategy extends Auth0InternalStrategy {
|
||||
authenticate(req: express.Request, options: Record<string, any>): void {
|
||||
super.authenticate(req, {
|
||||
...options,
|
||||
invitation: req.query.invitation?.toString(),
|
||||
organization: req.query.organization,
|
||||
invitation: req.query.invitation,
|
||||
});
|
||||
}
|
||||
|
||||
authorizationParams(options: Record<string, any>): Record<string, any> {
|
||||
const params = super.authorizationParams(options);
|
||||
|
||||
if (this.organization) {
|
||||
params.organization = this.organization;
|
||||
if (options.organization || this.organization) {
|
||||
params.organization = options.organization || this.organization;
|
||||
}
|
||||
|
||||
if (options.invitation) {
|
||||
|
||||
Reference in New Issue
Block a user