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

use default session cookie domain #554

Merged
merged 1 commit into from
May 4, 2021

Conversation

dakaza98
Copy link
Member

@dakaza98 dakaza98 commented May 1, 2021

Description of the Change

Currently, if you sign in to one website, you are signed in on all the other subdomains. For example if you sign in to utn.se you are automatically signed in to apply.utn.se, balen.utn.se etc. This is because all subdomains share the same session and it comes from the setting SESSION_COOKIE_DOMAIN in settings/production.py which is set to .utn.se i.e. all domains that end with utn.se. However, you can't sign in on utnarm.se, as mentioned in #449, since it is a different domain from utn.se and this setting is the reason why. This PR solves that

The solution is to remove this setting and go with the default and traditional behavior which is that each domain has their own separate session, as described in the django documentation. This means that if you sign in to utn.se, you will no longer be automatically signed in to apply.utn.se or any of the other domains. Instead you will have to sign in to them individually. But this will make it possible to sign in to utnarm.se and any other domains in the future.

Applicable Issues

Closes #449

@Antonfogelberg Antonfogelberg merged commit f2e68d7 into development May 4, 2021
@Antonfogelberg Antonfogelberg deleted the fix/cookies-multiple-domains branch May 4, 2021 17:48
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.

Fix cookies for Utnarm
2 participants