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

Adding optional support for setting the cookie domain for JWT authentication tokens #568

Merged
merged 1 commit into from
Nov 15, 2023
Merged

Adding optional support for setting the cookie domain for JWT authentication tokens #568

merged 1 commit into from
Nov 15, 2023

Conversation

adrenaline681
Copy link
Contributor

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 :)

@iMerica
Copy link
Owner

iMerica commented Nov 15, 2023

Thanks for your contribution @adrenaline681

@iMerica iMerica merged commit c6b6530 into iMerica:master Nov 15, 2023
@AydSu
Copy link

AydSu commented Jan 22, 2024

I see that JWT_AUTH_COOKIE_DOMAIN is merged into master. But I can't see it in https://dj-rest-auth.readthedocs.io/en/latest/configuration.html#. Is readthedocs updated?

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

Successfully merging this pull request may close these issues.

3 participants