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

request: opposite default behavior for SOCIAL_AUTH_SESSION_EXPIRATION #356

Closed
gameguy43 opened this issue Aug 18, 2014 · 8 comments
Closed

Comments

@gameguy43
Copy link
Contributor

Hey there,

I just had quite a bit of trouble debugging a tricky issue where /some/ of my users were getting logged out just an hour or so after logging in.

After some digging, I learned that the issue was mostly effecting google-oauth2 users.

Finally, I noticed that the issue was the default setting for SOCIAL_AUTH_SESSION_EXPIRATION, which was /overriding/ the SESSION_COOKIE_AGE setting to make user sessions only last as long as the token from the auth provider. In the case of google-oauth2, this is just an hour or so. It was quite confusing that even though I had django setting for SESSION_COOKIE_AGE (set to 1 year), this setting was not being honored.

So I suggest that the /default/ behavior should be to respect SESSION_COOKIE_AGE, with the /option/ to favor the auth provider's 'expires' header.

Happy to write a pull request if project maintainers agree. Thanks!

@omab
Copy link
Owner

omab commented Aug 18, 2014

@gameguy43, I think that your request is reasonable and should be applied, I'm look forward that PR.

Thanks!

@gameguy43
Copy link
Contributor Author

resolved with #358

@eyscode
Copy link

eyscode commented Sep 9, 2014

Hi, what happen with this commit?, I see the change in the master branch, but not in the latest v0.1.26 on pip (neither in v0.1.24, 0.1.25) Anyone know anything about it? @omab @gameguy43

At the moment, when using google-plus backend, the sessionid expires in 1 hour, unless the SOCIAL_AUTH_SESSION_EXPIRATION is False. @omab @gameguy43

@omab
Copy link
Owner

omab commented Sep 9, 2014

@eyscode, the change is not released at the moment, v0.2.0 introduced some backward incompatibles changes and it won't be released until I work on a doc explaining the changes.

@eyscode
Copy link

eyscode commented Sep 9, 2014

Thanks for the prompt reply.

@omab
Copy link
Owner

omab commented Sep 22, 2014

This is released now.

@gameguy43
Copy link
Contributor Author

👍

@eyscode
Copy link

eyscode commented Sep 22, 2014

Cool (:

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

No branches or pull requests

3 participants