Skip to content

How does get_user make sure that the session is still valid (not expired)? #2077

Answered by carltongibson
imran-iq asked this question in Help!
Discussion options

You must be logged in to vote

If you're dealing with short-lived sessions you can check the session's expire_date, or you can refresh the session in the scope (similarly to refetching the user).

(I suspect periodically calling session.save() is going to be the simplest way forward, but it depends on your exact use-case 🤔)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@imran-iq
Comment options

Answer selected by imran-iq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help!
Labels
None yet
2 participants