Merged in feat/LOY-230-Microsoft-Entra-ID-Auth (pull request #2113)
Feat(LOY-230): DTMC Routes with Entra ID Auth & Error Page Handling * feat(LOY-230): Link Scandic Friends and Azure accounts * fix(LOY-230): remove employee id param setting * fix(LOY-230): return token in jwt callback for auth.dtmc.ts Approved-by: Michael Zetterberg Approved-by: Christian Andolf
This commit is contained in:
@@ -41,3 +41,17 @@ export function internalServerError(cause?: unknown) {
|
||||
resInit
|
||||
)
|
||||
}
|
||||
|
||||
export function serviceUnavailable(cause?: unknown) {
|
||||
const resInit = {
|
||||
status: 503,
|
||||
statusText: "Service Unavailable",
|
||||
}
|
||||
|
||||
return NextResponse.json(
|
||||
{
|
||||
cause,
|
||||
},
|
||||
resInit
|
||||
)
|
||||
}
|
||||
|
||||
@@ -40,7 +40,8 @@ export const userQueryRouter = router({
|
||||
ctx: {
|
||||
...opts.ctx,
|
||||
isMFA:
|
||||
opts.ctx.session.token.mfa_scope &&
|
||||
!!opts.ctx.session.token.mfa_scope &&
|
||||
!!opts.ctx.session.token.mfa_expires_at &&
|
||||
opts.ctx.session.token.mfa_expires_at > Date.now(),
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user