-
Notifications
You must be signed in to change notification settings - Fork 653
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
login shows redirect error in console #282
Comments
@nikolaynizruhin have you made any modification on source code, especially permission.js ? |
@tuandm You probably meant @nikulvnnovate |
Yes, I did changes in permission.js |
@nikulvnnovate Can you please post your code here so everyone can check it? Since you made some changes, the new code may not work as expected. |
@nikolaynizruhin Sorry, I was careless. |
this is my code for permission.js import router from './router'; NProgress.configure({ showSpinner: false }); // NProgress Configuration const whiteList = ['/login', '/forgot-password', '/password/reset/:token', '/auth-redirect']; // no redirect whitelist router.beforeEach(async(to, from, next) => { // determine whether the user has logged in if (isUserLogged) {
} else {
} router.afterEach(() => { I have fixed this issue by redirecting user with router-link after login but is this proper solution? |
System logs in successfully but it shows below error in console. anyone has idea how to solve this.
thanks
Uncaught (in promise) Error: Redirected when going from "/login" to "/dashboard" via a navigation guard.
at createRouterError (vue-router.esm.js?8c4f:2065)
at createNavigationRedirectedError (vue-router.esm.js?8c4f:2024)
at eval (vue-router.esm.js?8c4f:2371)
at _callee$ (permission.js?1827:88)
at tryCatch (runtime.js?98b8:63)
at Generator.invoke [as _invoke] (runtime.js?98b8:293)
at Generator.eval [as next] (runtime.js?98b8:118)
at asyncGeneratorStep (asyncToGenerator.js?c973:3)
at _next (asyncToGenerator.js?c973:25)
The text was updated successfully, but these errors were encountered: