lynndylanhurley / lynndylanhurley/devise_token_auth

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

Open
#1,597 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
3.6k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the access-token header generation around the change_headers_on_each_request configuration and reproduce the behavior with redux-auth-token. Done means unchanged tokens no longer produce blank headers, while a new token is returned when appropriate; verify the request and response behavior with the project's existing tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
api, authentication
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.