project-pegaprox
project-pegaprox copied to clipboard
OIDC callback fails with TypeError: oidc_decode_id_token() got an unexpected keyword argument 'config'
Bug Description
OIDC authentication fails during the callback phase. The token exchange with the IdP succeeds (HTTP 200), but PegaProx crashes when decoding the ID token.
Error
Exception on /api/auth/oidc/callback [POST]
File "/app/pegaprox/api/auth.py", line 155, in oidc_callback
id_claims = oidc_decode_id_token(id_token_raw, expected_nonce=stored_nonce, config=config)
TypeError: oidc_decode_id_token() got an unexpected keyword argument 'config'
Root Cause
In api/auth.py line 155, oidc_decode_id_token() is called with config=config, but the function signature in utils/oidc.py line 227 doesn't accept it:
# auth.py (call)
id_claims = oidc_decode_id_token(id_token_raw, expected_nonce=stored_nonce, config=config)
# oidc.py (definition)
def oidc_decode_id_token(id_token: str, expected_nonce: str = None) -> dict:
Fix
Remove config=config from the call:
id_claims = oidc_decode_id_token(id_token_raw, expected_nonce=stored_nonce)
Environment
- PegaProx: built from
mainbranch (March 2026) - Python: 3.12
- IdP: Authentik (OAuth2/OIDC)
- Scopes:
openid profile email
Hi @KiruaZ ,
Funny timing – I actually came across this two days ago and already had a commit mostly ready. Then I saw you opened a ticket for it :) Just pushed the fix, it'll be included in tomorrow's update.
Regards, Marcus
Hi @KiruaZ ,
please update to the latest version. Best Regards, Nico