Closed humesy closed 3 months ago
Hey @waiting-for-dev, just pinging to make sure you're aware of this :) When you have the time I would love a review, thanks!
Hey @humesy, are you willing to follow-up here? 🙂
Hey @waiting-for-dev , sorry I've taken so long to get to this! I appreciate your review and I will make some updates today, thanks!
Very much in support of this, I'm in the same situation. This would 100% solve my problem.
Available in v0.10.0
@waiting-for-dev Thanks heaps! I have opened the corresponding PR for devise-jwt here https://github.com/waiting-for-dev/devise-jwt/pull/271
Summary
Adds the ability to change the header that the JWT token is sent & received through.
This has been in use in conjunction with an update to devise-jwt (will open PR if this one is approved) in a production application for more than 1 year without issue.
Why it was needed When implementing devise-jwt to my platform, an issue was encountered with the 'Authorization' header always being used to transmit the JWT token. This is due to testing environments that use basic HTTP authentication, in which the 'Authorization' header is used for this authentication. This update allowed us to use a different header in our testing environments to avoid conflicting.
How it works If you need a custom header for a reason like the above, set the token_header configuration option. If you do not set an option, it will default to 'Authorization' and so will not affect existing implementations.
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed (~cross them out~ if they are not):
- [ ] I have attached screenshots to demo visual changes.- [ ] I have opened a PR to update the guides.