Claper
Claper copied to clipboard
fix: Add state parameter to OIDC authorization request (#143)
Summary
Fixes #143 - OIDC login fails with Authelia due to missing state parameter.
Problem
Authelia requires the state parameter in OIDC authorization requests (minimum 8 characters for entropy). The previous implementation didn't include this parameter, causing invalid_state errors.
Changes
- Added
generate_state/0function to create cryptographically secure 32-byte state values - Store state in session alongside PKCE verifier during authorization
- Validate returned state matches stored state on callback (CSRF protection)
- Include
stateparameter inOidcc.create_redirect_urloptions
/claim #143
@alxlion Please review. I believe this fixes it
seems formatting fails. will fx that later
code formatted, builds,and test pass. ci should pass