p2-inc / keycloak-magic-link

Magic Link Authentication for Keycloak
Other
217 stars 43 forks source link

Fix issue with Keycloak IDP nonce mismatch #67

Closed tfcornerstone closed 5 months ago

tfcornerstone commented 5 months ago

Add the nonce to session note to resolve the OIDCIdentityProvider issue with nonce mismatch.

This issue occurs when one keycloak uses another keycloak with magic link as a broker.

Reference to broker codes causing the issue:

https://github.com/keycloak/keycloak/blob/e14b523a8d569db0f7a0997d247cab12ec2e6011/services/src/main/java/org/keycloak/broker/oidc/OIDCIdentityProvider.java#L416

https://github.com/keycloak/keycloak/blob/e14b523a8d569db0f7a0997d247cab12ec2e6011/services/src/main/java/org/keycloak/broker/oidc/OIDCIdentityProvider.java#L941

Bug:

Screenshot 2024-02-01 183309