Compare commits
1 Commits
beac1b3dab
...
e7d180912b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e7d180912b |
@@ -172,8 +172,11 @@ def create_base_app(
|
||||
if uid and grant_token:
|
||||
cache_key = f"grant:{grant_token}"
|
||||
if redis:
|
||||
# Quick check: if did_auth was cleared (logout), skip cache
|
||||
device_id = g.device_id
|
||||
did_auth_present = await redis.get(f"did_auth:{device_id}") if device_id else True
|
||||
cached = await redis.get(cache_key)
|
||||
if cached == b"ok":
|
||||
if cached == b"ok" and did_auth_present:
|
||||
return
|
||||
if cached == b"revoked":
|
||||
qs.pop("uid", None)
|
||||
|
||||
Reference in New Issue
Block a user