From 867c905da5de062fb2944e1b5ffa1c072d9c4f86 Mon Sep 17 00:00:00 2001 From: Jack Palmer Date: Thu, 5 Feb 2026 13:32:49 +0000 Subject: [PATCH] feat: auth0 strategy - add additional organization query params to authorizationParams Signed-off-by: Jack Palmer --- .changeset/{calm-jars-wear.md => brown-grapes-fold.md} | 2 +- plugins/auth-backend-module-auth0-provider/src/strategy.ts | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) rename .changeset/{calm-jars-wear.md => brown-grapes-fold.md} (51%) diff --git a/.changeset/calm-jars-wear.md b/.changeset/brown-grapes-fold.md similarity index 51% rename from .changeset/calm-jars-wear.md rename to .changeset/brown-grapes-fold.md index 2b71931600..6f9c7bcab5 100644 --- a/.changeset/calm-jars-wear.md +++ b/.changeset/brown-grapes-fold.md @@ -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 diff --git a/plugins/auth-backend-module-auth0-provider/src/strategy.ts b/plugins/auth-backend-module-auth0-provider/src/strategy.ts index c2eb2a283c..f45e672556 100644 --- a/plugins/auth-backend-module-auth0-provider/src/strategy.ts +++ b/plugins/auth-backend-module-auth0-provider/src/strategy.ts @@ -51,15 +51,16 @@ export class Auth0Strategy extends Auth0InternalStrategy { authenticate(req: express.Request, options: Record): void { super.authenticate(req, { ...options, - invitation: req.query.invitation?.toString(), + organization: req.query.organization, + invitation: req.query.invitation, }); } authorizationParams(options: Record): Record { 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) {