Skip to content
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

Uncaught (in promise) Error: Avoided redundant navigation to current location: "/login". #265

Closed
janvorisek opened this issue Jul 13, 2020 · 3 comments
Assignees
Labels
bug Something isn't working released

Comments

@janvorisek
Copy link

Describe the bug
I have my login form on the authRedirect page (/login). After my API server returns failed login (code 401), the plugin attempts to redirect to the same page which results into uncaught error.

To Reproduce
Steps to reproduce the behavior:
Call this.$auth.login({ ... }) on the authRedirect page (/login).

Expected behavior
I'd expect no redirect if login request failed and the user is already on the authRedirect page.

@d0whc3r d0whc3r self-assigned this Jul 14, 2020
@d0whc3r d0whc3r added the bug Something isn't working label Jul 14, 2020
@d0whc3r
Copy link
Owner

d0whc3r commented Jul 14, 2020

Thanks to report, I will check asap

@janvorisek
Copy link
Author

I also got an error on the after login route. Not sure why it attempted to redirect while logged in, but that may be related to the dev server.

I think both redirects are happening inside the beforeEach navigation guards, maybe some check like if from == to then next(false) could be implemented.

d0whc3r pushed a commit that referenced this issue Jul 19, 2020
## [1.8.5](v1.8.4...v1.8.5) (2020-07-19)

### Bug Fixes

* **redirect:** do not redirect to actual route ([d538f17](d538f17)), closes [#265](#265)
@d0whc3r
Copy link
Owner

d0whc3r commented Jul 19, 2020

🎉 This issue has been resolved in version 1.8.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

No branches or pull requests

2 participants