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:
@@ -2,7 +2,7 @@ import React from "react"
|
||||
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
import { linkEmployment } from "@/constants/routes/dtmc"
|
||||
import { dtmcLogin } from "@/constants/routes/dtmc"
|
||||
import { login } from "@/constants/routes/handleAuth"
|
||||
import { signup } from "@/constants/routes/signup"
|
||||
|
||||
@@ -19,6 +19,8 @@ export default async function EmployeeBenefitsCallToActions() {
|
||||
const intl = await getIntl()
|
||||
const lang = await getLang()
|
||||
|
||||
const loginAndLinkURL = `${login[lang]}?redirectTo=${encodeURIComponent(dtmcLogin[lang])}`
|
||||
|
||||
if (!isValidSession(session)) {
|
||||
return (
|
||||
<>
|
||||
@@ -30,7 +32,7 @@ export default async function EmployeeBenefitsCallToActions() {
|
||||
})}
|
||||
</p>
|
||||
</Typography>
|
||||
<ButtonLink href={login[lang]} size="Medium" variant="Tertiary">
|
||||
<ButtonLink href={loginAndLinkURL} size="Medium" variant="Tertiary">
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Log in and link employment",
|
||||
})}
|
||||
@@ -62,7 +64,7 @@ export default async function EmployeeBenefitsCallToActions() {
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<ButtonLink
|
||||
href={linkEmployment[lang]}
|
||||
href={dtmcLogin[lang]}
|
||||
size="Medium"
|
||||
variant="Tertiary"
|
||||
color="Primary"
|
||||
|
||||
Reference in New Issue
Block a user