OAuth2 OpenID Connect provider support etc. #3

Merged
LeoVasanko merged 65 commits from oidconnect into main 2026-02-18 02:40:27 +00:00
Showing only changes of commit 2e8439f876 - Show all commits
+9 -3
View File
@@ -186,12 +186,18 @@ def decode_access_token(
"""
_ensure_key()
try:
# Don't pass audience if None to avoid PyJWT audience validation
decode_kwargs = {
"algorithms": ["EdDSA"],
"issuer": issuer,
}
if audience is not None:
decode_kwargs["audience"] = audience
return jwt.decode(
token,
_public_key,
algorithms=["EdDSA"],
issuer=issuer,
audience=audience, # PyJWT handles None by skipping verification
**decode_kwargs
)
except jwt.PyJWTError as e:
print(f"DEBUG JWT decode error: {e}")