Client - add account confirmation (WIP)

This commit is contained in:
Sam
2022-03-20 10:37:47 +01:00
parent a1f80e9745
commit decff1cd6a
14 changed files with 188 additions and 21 deletions

View File

@ -79,6 +79,14 @@ const routes: Array<RouteRecordRaw> = [
),
props: { action: 'reset' },
},
{
path: '/account-confirmation',
name: 'AccountConfirmation',
component: () =>
import(
/* webpackChunkName: 'profile' */ '@/views/user/AccountConfirmation.vue'
),
},
{
path: '/email-update',
name: 'EmailUpdate',
@ -267,15 +275,16 @@ const pathsWithoutAuthentication = [
'/password-reset/request',
'/password-reset/sent',
'/register',
'/account-confirmation',
]
const paths = ['/email-update']
const pathsWithoutChecks = ['/email-update']
router.beforeEach((to, from, next) => {
store
.dispatch(AUTH_USER_STORE.ACTIONS.CHECK_AUTH_USER)
.then(() => {
if (paths.includes(to.path)) {
if (pathsWithoutChecks.includes(to.path)) {
return next()
}
if (