-
Notifications
You must be signed in to change notification settings - Fork 195
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
Once expired code will not reach refreshTokens #14
Comments
If a cookie has expired, the browser does not send that particular cookie to the server with the page request; instead, the expired cookie is deleted. |
which branch? |
sorry here
|
I have tested the logic in my own branch, and once the token expires its not sent. I believe this is different from browser to browser. perhaps this needs re-thought? |
I set the expiration to the same as the refresh token, so I think it should work in that case. But I think it's better to rework the logic to check if the refresh token is there even if the token is not. |
I think the issue would still remain the same and once expired it too can potentially no longer be sent. I guess there is not too much you can do under those circumstances, no token, then re-auth. Your logic is actually fine as long as the browser/client does not delete the cookie once expired |
on L 33 of index.js you have logic like this
if (!token) {
return next();
}
If the token were to expire in the client, the client will not send it along with the request meaning there is no token and refreshTokens would never be hit?
The text was updated successfully, but these errors were encountered: