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
{{ message }}
This repository has been archived by the owner on Jan 27, 2024. It is now read-only.
if(to.meta&&to.meta.auth!==undefined){if(to.meta.auth){// ...}// otherwise are we already authenticated?if(store.getters['auth/isAuthenticated']){// yes we are, so off to dashboardrouter.push({name: 'dashboard'})return}// ...}
in other words, if meta.auth was not undefined and it was also not true, then we would be redirected to Dashboard. Can be quite confusing, especially for a newbie trying to get started.
The text was updated successfully, but these errors were encountered:
It is identical to the (fixed) function from the router behavior wise, but it would likely be quite confusing for beginners (and not only) which is why I did not proposed it. Just mentioned it for fun :)
I'm a big fan of early returns, I think that all those levels of indentation (and mental overhead) is what lead to this bug in the 1st place. But the return next() is definitely in the gray area (at best) :)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I was unable to access the homepage while being authenticated, and it all boiled down to this: https://github.com/wolfeidau/cognito-vue-bootstrap/blob/master/src/router/index.js#L72-L76, I quote:
in other words, if
meta.auth
was notundefined
and it was also nottrue
, then we would be redirected to Dashboard. Can be quite confusing, especially for a newbie trying to get started.The text was updated successfully, but these errors were encountered: