Skip to content

Commit dec969b

Browse files
committed
Fix checkpoint behavior to only work when a token is provided
1 parent 4209be0 commit dec969b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

resources/assets/scripts/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const router = new VueRouter({
3535
routes: [
3636
{ name: 'login', path: '/auth/login', component: Login },
3737
{ name: 'forgot-password', path: '/auth/password', component: Login },
38-
{ name: 'checkpoint', path: '/checkpoint', component: Login },
38+
{ name: 'checkpoint', path: '/auth/checkpoint', component: Login },
3939
{
4040
name: 'reset-password',
4141
path: '/auth/password/reset/:token',

resources/assets/scripts/components/auth/TwoFactorForm.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@
3737
};
3838
},
3939
mounted: function () {
40+
if ((this.$route.query.token || '').length < 1) {
41+
return this.$router.push({ name: 'login' });
42+
}
43+
4044
this.$refs.code.focus();
4145
},
4246
methods: {

0 commit comments

Comments
 (0)