)
@@ -33,4 +34,13 @@ Login.getLayout = function PageLayout(page) {
return <>{page}>
}
-export default Login
+export async function getServerSideProps({ req, res, locale }) {
+ //Temporary for testing purposes until auth flow is publicly accessible
+ const authDisabled = AuthIsDisabled() ? true : false
+
+ return {
+ props: {
+ authDisabled: authDisabled ?? true,
+ },
+ }
+}
diff --git a/pages/auth/logout.js b/pages/auth/logout.js
index d82310d6e..f10dc272f 100644
--- a/pages/auth/logout.js
+++ b/pages/auth/logout.js
@@ -1,15 +1,20 @@
import { useEffect } from 'react'
import { getLogoutURL, AuthIsDisabled } from '../../lib/auth'
import { LoadingSpinner } from '@dts-stn/service-canada-design-system'
+import { signOut } from 'next-auth/react'
export default function Logout(props) {
//Redirect to ECAS global sign out
useEffect(() => {
- window.location.replace(props.logoutURL)
+ const logout = async () => {
+ await signOut({ redirect: false })
+ window.location.replace(props.logoutURL)
+ }
+ logout().catch(console.error)
}, [props.logoutURL])
return (
-
+
)
@@ -30,8 +35,7 @@ export async function getServerSideProps({ req, res, locale }) {
return {
props: {
- locale,
- logoutURL: logoutURL,
+ logoutURL: logoutURL ?? '/',
},
}
}
diff --git a/pages/my-dashboard.js b/pages/my-dashboard.js
index edc80e12e..a217a0719 100644
--- a/pages/my-dashboard.js
+++ b/pages/my-dashboard.js
@@ -68,7 +68,7 @@ export default function MyDashboard(props) {
>
{tasks.map((taskList, index) => {
return (
-
+
diff --git a/pages/profile.js b/pages/profile.js
index 62ddd9e3a..899554b94 100644
--- a/pages/profile.js
+++ b/pages/profile.js
@@ -57,12 +57,14 @@ export default function Profile(props) {
accessText={props.content.lookingFor.subText[0]}
linkText={props.content.lookingFor.subText[1]}
href={props.content.lookingFor.link}
- linkID="link-id"
+ linkID={props.content.backToDashboard.id}
dataCy="access-security-page-link"
buttonHref={props.content.backToDashboard.btnLink}
buttonId="back-to-dashboard-button"
buttonLinkText={props.content.backToDashboard.btnText}
refPageAA={props.aaPrefix}
+ dashId={t.id_dashboard}
+ linkId={props.content.lookingFor.id}
>
)
@@ -149,7 +151,7 @@ export async function getServerSideProps({ res, locale }) {
bannerContent: locale === 'en' ? bannerContent.en : bannerContent.fr,
popupContent: locale === 'en' ? popupContent.en : popupContent.fr,
popupContentNA: locale === 'en' ? popupContentNA.en : popupContentNA.fr,
- aaPrefix: `ESDC-EDSC:${content.en?.heading || content.en?.title}`,
+ aaPrefix: `ESDC-EDSC:${content.en?.pageName}`,
popupStaySignedIn:
locale === 'en'
? authModals.mappedPopupStaySignedIn.en
diff --git a/pages/security-settings.js b/pages/security-settings.js
index ddaac8096..0a02b3b61 100644
--- a/pages/security-settings.js
+++ b/pages/security-settings.js
@@ -29,7 +29,6 @@ export default function SecuritySettings(props) {
window.removeEventListener('click', throttledOnClickEvent)
}
}, [throttledOnClickEvent])
-
return (
@@ -58,12 +57,14 @@ export default function SecuritySettings(props) {
accessText={props.content.lookingFor.subText[0]}
linkText={props.content.lookingFor.subText[1]}
href={props.content.lookingFor.link}
- linkID="link-id"
+ linkID={t.backToDashboard.id}
dataCy="access-profile-page-link"
buttonHref={t.url_dashboard}
buttonId="back-to-dashboard-button"
buttonLinkText={t.backToDashboard}
refPageAA={props.aaPrefix}
+ dashId={t.id_dashboard}
+ linkId={props.content.lookingFor.id}
>
)
diff --git a/tailwind.config.js b/tailwind.config.js
index b81864498..63ecbd6c4 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -59,6 +59,7 @@ module.exports = {
'60b': '#335075',
'60d': '#295376',
'60f': '#0E62C9',
+ 'focus': '#1c578a',
},
'red': {
light: '#B76565',