Skip to content

Commit b6a02ba

Browse files
authored
feat: forward org ID during login and registration (#293)
* 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: ory/kratos@7aa2e29...fc30304 Signed-off-by: Henning Perl <[email protected]> * feat: forward org ID during registration --------- Signed-off-by: Henning Perl <[email protected]>
1 parent 0afcf82 commit b6a02ba

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/routes/login.ts

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export const createLoginRoute: RouteCreator =
2727
aal = "",
2828
refresh = "",
2929
return_to = "",
30+
organization = "",
3031
login_challenge,
3132
} = req.query
3233
const { frontend, kratosBrowserUrl, logoUrl } = createHelpers(req, res)
@@ -35,6 +36,7 @@ export const createLoginRoute: RouteCreator =
3536
aal: aal.toString(),
3637
refresh: refresh.toString(),
3738
return_to: return_to.toString(),
39+
organization: organization.toString(),
3840
})
3941

4042
if (isQuerySet(login_challenge)) {

src/routes/registration.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,18 @@ export const createRegistrationRoute: RouteCreator =
2222
(createHelpers) => (req, res, next) => {
2323
res.locals.projectName = "Create account"
2424

25-
const { flow, return_to, after_verification_return_to, login_challenge } =
26-
req.query
25+
const {
26+
flow,
27+
return_to,
28+
after_verification_return_to,
29+
login_challenge,
30+
organization,
31+
} = req.query
2732
const { frontend, kratosBrowserUrl, logoUrl } = createHelpers(req, res)
2833

2934
const initFlowQuery = new URLSearchParams({
3035
...(return_to && { return_to: return_to.toString() }),
36+
...(organization && { organization: organization.toString() }),
3137
...(after_verification_return_to && {
3238
after_verification_return_to: after_verification_return_to.toString(),
3339
}),

0 commit comments

Comments
 (0)