Feature/handling redirect when digiD login is cancelled - #11
Conversation
#PR Summary This PR adds configurable error redirect handling to the SAML authentication flow. New configuration options (disabled by default): customErrorRedirectEnabled — enables custom error redirects errorCallbackPath — redirect path for error/denied cases cancelledCallbackPath — redirect path for cancelled/failed cases When enabled, a wrapper (ErrorRedirectCallbackWrapper) intercepts error() and cancelled() callbacks and issues a 302 redirect to the configured paths. All other behavior remains unchanged and falls back to the default implementation if needed. Basic open redirect protections are included (restricted schemes, validated paths, no user-controlled domains). Feel free to adjust this PR to better align with your company’s standards and conventions.
|
@Dpragt Having two keys instead of four not only makes the frontend acceptable, but it also would make the backend less cluttered in my opinion. Not to pressure you (after having made you wait for 3 weeks), but we want to merge the PR before next Wednesday if possible. That is: Before we update the plugin for the next Keycloak versions, which we are quite behind on. Let us know if that is not doable, then I will commit the suggested adjustment myself, if you are also okay with that. |
|
@0314R |
#PR Summary
This PR adds configurable error redirect handling to the SAML authentication flow.
New configuration options (disabled by default):
When enabled, a wrapper (ErrorRedirectCallbackWrapper) intercepts error() and cancelled() callbacks and issues a 302 redirect to the configured paths. All other behavior remains unchanged and falls back to the default implementation if needed.
Basic open redirect protections are included (restricted schemes, validated paths, no user-controlled domains).
Feel free to adjust this PR to better align with your company’s standards and conventions.