You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.
Question regarding to auth.get_user_by_session when reusing the previous auth cookie after user logs out.
How to reproduce:
I have RequestHandler.session_store configured with backend='datastore'.
After login (with remember=True), capture the raw value of the auth cookie.
Logout by calling auth.unset_session(), which deletes the UserToken from server side.
Replace the auth cookie with the value captured in step 2.
Reload page and auth.get_user_by_session returns the previous logged in user.
Here are my findings:
auth.get_user_by_session invokes get_user_by_token which checks the cache and cache_ts first. The next step, token validation will be skipped if the cache_ts is valid.
--
So a valid client side auth cookie can be reused as long as the cache timestamp is valid and even the corresponding UserToken has been removed from server side.
Am I right? Did I miss anything?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
Question regarding to
auth.get_user_by_session
when reusing the previousauth
cookie after user logs out.How to reproduce:
RequestHandler.session_store
configured withbackend='datastore'
.remember=True
), capture the raw value of theauth
cookie.auth.unset_session()
, which deletes theUserToken
from server side.auth
cookie with the value captured in step 2.auth.get_user_by_session
returns the previous logged in user.Here are my findings:
auth.get_user_by_session
invokesget_user_by_token
which checks thecache
andcache_ts
first. The next step, token validation will be skipped if thecache_ts
is valid.--
So a valid client side
auth
cookie can be reused as long as the cache timestamp is valid and even the correspondingUserToken
has been removed from server side.Am I right? Did I miss anything?
The text was updated successfully, but these errors were encountered: