Fix checkpoint behavior to only work when a token is provided
This commit is contained in:
parent
4209be021e
commit
dec969bf9f
|
@ -35,7 +35,7 @@ const router = new VueRouter({
|
||||||
routes: [
|
routes: [
|
||||||
{ name: 'login', path: '/auth/login', component: Login },
|
{ name: 'login', path: '/auth/login', component: Login },
|
||||||
{ name: 'forgot-password', path: '/auth/password', component: Login },
|
{ name: 'forgot-password', path: '/auth/password', component: Login },
|
||||||
{ name: 'checkpoint', path: '/checkpoint', component: Login },
|
{ name: 'checkpoint', path: '/auth/checkpoint', component: Login },
|
||||||
{
|
{
|
||||||
name: 'reset-password',
|
name: 'reset-password',
|
||||||
path: '/auth/password/reset/:token',
|
path: '/auth/password/reset/:token',
|
||||||
|
|
|
@ -37,6 +37,10 @@
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
|
if ((this.$route.query.token || '').length < 1) {
|
||||||
|
return this.$router.push({ name: 'login' });
|
||||||
|
}
|
||||||
|
|
||||||
this.$refs.code.focus();
|
this.$refs.code.focus();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
Loading…
Reference in New Issue