Skip to content

Conversation

@Excellencedev
Copy link

Description

This PR fixes issue #143 where Authelia OIDC login fails due to a missing or weak state parameter.

Changes include:

  • Secure State Generation: Generates a cryptographically strong 16-byte random state (base64 encoded) in UserOidcAuth.new/2.
  • Nonce Support: Generates a secure nonce for additional security and passes it to Oidcc.
  • Validation: Validates the state parameter in UserOidcAuth.callback/2 against the session value to prevent CSRF attacks.
  • Tests: Added UserOidcAuthTest to verify the presence of security parameters in the session and proper error handling.

/claim #143

@Excellencedev
Copy link
Author

@alxlion pls review

Copy link

@Exceluyi Exceluyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Excellencedev Works perfectly fine for me !
Just fix formatting issues

@Excellencedev
Copy link
Author

@Exceluyi thanks for confirming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants