You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a beforeEach statement in my vue router that does this :
router.beforeEach(async(to,from,next)=>{constisLoggedIn=getIsLoggedIn()// ...}if(to.meta.requiresAuth){if(isLoggedIn){// ...}else{let res =awaitrouter.app.$dialog.show(WarningModal,{persistent: true,waitForResult: true,icon: 'login',title: 'Warning: Login Required',message: 'Your session may have expired.',advice: 'Please log again and retry.',okColor: 'primary',okHandler: function(){returnnewPromise(resolve=>{resolve()})}})if(res){handleUnloggedStatus()router.push({name: 'LoginForm'})}}}else{next()}})
And when I start my app on a URL that requiresAuth, if I'm not logged in it tries to display the modal, which fails.
If I first login and do things, the modal is usable as normal because I use it for other purposes such as asking confirmation before a delete.
How can I solve this problem here ? Since it doesn't seem to be able to find v-app properly I think ?
The text was updated successfully, but these errors were encountered:
Hello there !
I have a
beforeEach
statement in my vue router that does this :With the
WarningModal
modal being :And when I start my app on a URL that requiresAuth, if I'm not logged in it tries to display the modal, which fails.
If I first login and do things, the modal is usable as normal because I use it for other purposes such as asking confirmation before a delete.
How can I solve this problem here ? Since it doesn't seem to be able to find v-app properly I think ?
The text was updated successfully, but these errors were encountered: