Add account recovery, visible access records and shared sign-out handoff
Assistant: codex Assistant-Model: gpt-6-astra Assistant-Session: 01a092fe-13b1-7f12-ac74-7d258af4d79c
This commit is contained in:
parent
7330c25d80
commit
e54b6ee970
5 changed files with 169 additions and 13 deletions
|
|
@ -89,7 +89,11 @@ class OIDCClient:
|
|||
with urlopen(request, timeout=10) as response:
|
||||
tokens = json.loads(response.read())
|
||||
token = str(tokens.get("id_token") or tokens.get("access_token") or "")
|
||||
claims = self._verify(token)
|
||||
import jwt
|
||||
try:
|
||||
claims = self._verify(token)
|
||||
except jwt.PyJWTError:
|
||||
raise ValueError("OIDC token verification failed") from None
|
||||
session_id = secrets.token_urlsafe(32)
|
||||
expiry = min(float(claims.get("exp", time.time() + self.session_ttl)), time.time() + self.session_ttl)
|
||||
self.sessions[session_id] = BrowserSession(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue