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

bug multiple refresh #635

Open
nunob87 opened this issue Feb 26, 2021 · 4 comments
Open

bug multiple refresh #635

nunob87 opened this issue Feb 26, 2021 · 4 comments

Comments

@nunob87
Copy link

nunob87 commented Feb 26, 2021

if you do several refreshes in a row, it will give an error in the session, and kill the session

createError.js:16 Uncaught (in promise) Error: Request failed with status code 401
at e.exports (createError.js:16)
at e.exports (settle.js:17)
at XMLHttpRequest.d.onreadystatechange (xhr.js:69)

@websanova
Copy link
Owner

Seems like the error is coming fr that api?

@nunob87
Copy link
Author

nunob87 commented Feb 27, 2021

"@websanova/vue-auth": "^4.1.1",
"vue": "^2.6.12",

@lucianobosco
Copy link

Hey @nunob87 , why are you using sessions? The token-based auth supposed to be stateless, therefore no sessions should be used at all. You only need to keep record on the server-side about valid tokens and compare them with the token sent by Axios headers.

@kami4ka
Copy link

kami4ka commented Apr 26, 2021

Using vue-auth 3.3.8 and the same happens for me.
When refresh returns 401 it throws an unhandled exception (it happens when refreshing with old/invalid token, probably page stops refreshing when not active or something like that).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants