-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Host/Strata/Platform - UI: Login stuff (#385)
* update base login page, add bceid to hosts * update login screen for platform and strata * middleware update
- Loading branch information
Showing
15 changed files
with
187 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
declare module 'nuxt/schema' { | ||
interface AppConfigInput { | ||
strrBaseLayer: { | ||
page: { | ||
login: { | ||
redirectPath: string, | ||
options: { | ||
createAccount: boolean, | ||
idps: Array<'bcsc' | 'bceid' | 'idir'>, | ||
bcscSubtext: string | undefined, | ||
bceidSubtext: string | undefined, | ||
idirSubtext: string | undefined | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
declare module 'nuxt/schema' { | ||
interface AppConfig { | ||
strrBaseLayer: { | ||
page: { | ||
login: { | ||
redirectPath: string, | ||
options: { | ||
createAccount: boolean, | ||
idps: Array<'bcsc' | 'bceid' | 'idir'>, | ||
bcscSubtext: string | undefined, | ||
bceidSubtext: string | undefined, | ||
idirSubtext: string | undefined | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
export {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
export default defineNuxtRouteMiddleware(() => { | ||
const accountStore = useConnectAccountStore() | ||
const localePath = useLocalePath() | ||
const { kcUser } = useKeycloak() | ||
|
||
if (accountStore.userAccounts.length === 0) { | ||
if (accountStore.userAccounts.length === 0 && kcUser.value.loginSource === LoginSource.BCSC) { | ||
return navigateTo({ path: localePath('/auth/account/create-new') }) // TODO: add return url param for redirect? | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export default defineNuxtRouteMiddleware(() => { | ||
const { kcUser } = useKeycloak() | ||
|
||
if (kcUser.value.loginSource !== LoginSource.BCSC) { | ||
const localePath = useLocalePath() | ||
return navigateTo({ path: localePath('/auth/account/choose-existing') }) | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters