Skip to content

Commit

Permalink
🐛 Fixes order of onAuthRequired variables
Browse files Browse the repository at this point in the history
The to/from variables on the onAuthRequired function were backwards.

Resolves: okta#22
  • Loading branch information
Matt Strayer committed Oct 18, 2018
1 parent 89baf66 commit d351403
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom-login/src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const router = new Router({
]
})

const onAuthRequired = async (from, to, next) => {
const onAuthRequired = async (to, from, next) => {
if (from.matched.some(record => record.meta.requiresAuth) && !(await Vue.prototype.$auth.isAuthenticated())) {
// Navigate to custom login page
next({ path: '/login' })
Expand Down

0 comments on commit d351403

Please sign in to comment.