HyphaApp / hypha

Submission management software for open calls
https://www.hypha.app
BSD 3-Clause "New" or "Revised" License
67 stars 38 forks source link

Implement `Remember me` for OAuth/Magic Link #4009

Open wes-otf opened 1 week ago

wes-otf commented 1 week ago

Staff have asked if the "remember me" option could be implemented for OAuth as they have to re-login daily. This has had some small residual effects like staff losing a typed up determination that they tried to submit 12 hours later (which should have been drafted but nonetheless). More of an inconvenience than a mission critical addition.

frjo commented 1 week ago

Can you test to set this in base.py in the OTF instance?

SOCIAL_AUTH_SESSION_EXPIRATION = True

See https://python-social-auth.readthedocs.io/en/latest/configuration/settings.html#miscellaneous-settings

Then we can see if it works and what session length Google in that case sets.

wes-otf commented 1 week ago

oh perfect! I didn't even do a deep dive into the social auth so I'll change this today.

wes-otf commented 6 days ago

alright so turns out the Google OAuth expiry is one hour so that didn't workout too well hahaha. I already reverted it but it looks like we may need to put more dev time into OAuth + magic link remember me's

frjo commented 6 days ago

@wes-otf Found https://support.google.com/a/answer/7576830?hl=en#zippy=%2Cthird-party-identity-providers

Can you check and see if you pr @Techslammer can adjust this for OTF on the Google side?