Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#16983 - Adjustments to Authentication Flow #343

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions vue/sbc-common-components/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vue/sbc-common-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sbc-common-components",
"version": "4.0.1",
"version": "4.0.2",
"private": false,
"description": "Common Vue Components to be used across BC Registries and Online Services.",
"license": "Apache-2.0",
Expand Down
4 changes: 2 additions & 2 deletions vue/sbc-common-components/src/components/LoadingScreen.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
>
<v-progress-circular
class="v-loader"
size="50"
width="5"
size="30"
color="primary"
:indeterminate="props.isLoading"
/>
</div>
Expand Down
4 changes: 2 additions & 2 deletions vue/sbc-common-components/src/components/SbcHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@
<v-menu
v-if="!isAuthenticated && showLoginMenu"
fixed
location="left"
location="bottom right"
width="330"
transition="slide-y-transition"
attach="#appHeader"
>
<template #activator="{ props }">

Check warning on line 80 in vue/sbc-common-components/src/components/SbcHeader.vue

View workflow job for this annotation

GitHub Actions / linting (16.14.2)

Variable 'props' is already declared in the upper scope
<v-btn
id="loginBtn"
size="large"
Expand Down Expand Up @@ -119,7 +119,7 @@
anchor="bottom"
transition="slide-y-transition"
>
<template #activator="{ props }">

Check warning on line 122 in vue/sbc-common-components/src/components/SbcHeader.vue

View workflow job for this annotation

GitHub Actions / linting (16.14.2)

Variable 'props' is already declared in the upper scope
<v-btn
variant="text"
size="large"
Expand Down Expand Up @@ -171,11 +171,11 @@
<!-- Account -->
<v-menu
v-if="isAuthenticated"
location="left"
location="bottom right"
transition="slide-y-transition"
attach="#appHeader"
>
<template #activator="{ props }">

Check warning on line 178 in vue/sbc-common-components/src/components/SbcHeader.vue

View workflow job for this annotation

GitHub Actions / linting (16.14.2)

Variable 'props' is already declared in the upper scope
<v-btn
variant="text"
size="large"
Expand Down
11 changes: 5 additions & 6 deletions vue/sbc-common-components/src/components/SbcSignin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,19 @@ kcInit
// Set values to session storage
await KeyCloakService.initSession()
await accountStore.loadUserInfo()
const userInfo = accountStore.currentUser as KCUserProfile
const userInfo = accountStore.state.currentUser as KCUserProfile
await accountStore.updateUserProfile()
await accountStore.syncAccount()
// if not from the sbc-auth, do the checks and redirect to sbc-auth
if (!props.inAuth) {
// redirect to create account page if the user has no 'account holder' role
const isRedirectToCreateAccount =
userInfo.roles.includes(Role.PublicUser) &&
!userInfo.roles.includes(Role.AccountHolder)
await accountStore.getCurrentUserProfile(props.inAuth)
const currentUser = accountStore.currentUser
userInfo.roles.includes(Role.PublicUser) &&
!userInfo.roles.includes(Role.AccountHolder)
const userProfile = await accountStore.getCurrentUserProfile(props.inAuth)
if (
userInfo?.loginSource !== LoginSource.IDIR &&
!currentUser?.userTerms?.isTermsOfUseAccepted
!userProfile?.userTerms?.isTermsOfUseAccepted
) {
console.log('[SignIn.vue]Redirecting. TOS not accepted')
redirectToPath(props.inAuth, Pages.USER_PROFILE_TERMS)
Expand Down
Loading