Adding optional support for setting the cookie domain for JWT authentication tokens #568
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Users using SPA commonly set their backend in a separate subdomain like for example api.example.com. When the JWT auth token cookie is set, it will only be set on that domain (api.example.com).
With this update users can have the option to change the domain where the auth cookies are set thus allowing the cookies to be set for all subdomains. It also fixes issues when Server Side Rendering pages in frameworks like NextJs where the SSR part of the application has no access to the auth cookies thus can't forward them to the Django backend.
Fixes issue #238
Thanks for your time.
PS: It's my first contribution on GitHub :)