From ef61dfbaa878e54bb61bc49dd283c4d7bb6306df Mon Sep 17 00:00:00 2001 From: Henning Perl Date: Mon, 11 Sep 2023 13:56:49 +0200 Subject: [PATCH 1/2] feat(changelog): support auth_type parameter The Facebook OIDC provider now supports an auth_type parameter that when set to "reauthenticate" will force the user to reauthenticate (similar to `prompt=login` for other Providers). Kratos changes: https://github.com/ory/kratos/compare/7aa2e293175d...fc303040b711 Signed-off-by: Henning Perl --- src/routes/login.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/routes/login.ts b/src/routes/login.ts index 9c8ad0bb..ff6f931e 100644 --- a/src/routes/login.ts +++ b/src/routes/login.ts @@ -27,6 +27,7 @@ export const createLoginRoute: RouteCreator = aal = "", refresh = "", return_to = "", + organization = "", login_challenge, } = req.query const { frontend, kratosBrowserUrl, logoUrl } = createHelpers(req, res) @@ -35,6 +36,7 @@ export const createLoginRoute: RouteCreator = aal: aal.toString(), refresh: refresh.toString(), return_to: return_to.toString(), + organization: organization.toString(), }) if (isQuerySet(login_challenge)) { From fb876bbb4a29a930b33cc25751b2cbc7a0cd4576 Mon Sep 17 00:00:00 2001 From: Henning Perl Date: Thu, 14 Sep 2023 18:33:28 +0200 Subject: [PATCH 2/2] feat: forward org ID during registration --- src/routes/registration.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/routes/registration.ts b/src/routes/registration.ts index 21b6fc03..8f2dba5f 100644 --- a/src/routes/registration.ts +++ b/src/routes/registration.ts @@ -22,12 +22,18 @@ export const createRegistrationRoute: RouteCreator = (createHelpers) => (req, res, next) => { res.locals.projectName = "Create account" - const { flow, return_to, after_verification_return_to, login_challenge } = - req.query + const { + flow, + return_to, + after_verification_return_to, + login_challenge, + organization, + } = req.query const { frontend, kratosBrowserUrl, logoUrl } = createHelpers(req, res) const initFlowQuery = new URLSearchParams({ ...(return_to && { return_to: return_to.toString() }), + ...(organization && { organization: organization.toString() }), ...(after_verification_return_to && { after_verification_return_to: after_verification_return_to.toString(), }),