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

access-token header is blank when token isn't changed yet. #1597

Open
dlikhten opened this issue May 2, 2023 · 1 comment
Open

access-token header is blank when token isn't changed yet. #1597

dlikhten opened this issue May 2, 2023 · 1 comment

Comments

@dlikhten
Copy link

dlikhten commented May 2, 2023

When posting issues, please include the following information to speed up the troubleshooting process:

  • Version: 1.2.1, using redux-auth-token

the token header (defaults to "access-token") is blank if the token doesn't change. Not blank if the token does change.

With the configuration change_headers_on_each_request = true old libraries like redux-auth-token assume that a token will come in with every request. Instead it is only set after the old token expired. There are a bunch of requests for which the token is blank, and the library just expects the client to use the lat token it provided.

This is definitely something that can be worked around (though had to rip open the library) but would be really ideal if we could just not return blank headers. Just return the same token if it isn't changed, and return a new one if appropriate.

Sidenote: Shouldn't every request get a new token anyways?

@gertjanjansen
Copy link

I'm also noticing that the token is blank sometimes, which is not what I'd expect if config.change_headers_on_each_request = true by default.

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

2 participants