Skip to content

Feature/handling redirect when digi d login is cancelled#11

Open
Dpragt wants to merge 2 commits into
First8:26.5.xfrom
Dpragt:feature/Handling-redirect-when-DigiD-login-is-cancelled
Open

Feature/handling redirect when digi d login is cancelled#11
Dpragt wants to merge 2 commits into
First8:26.5.xfrom
Dpragt:feature/Handling-redirect-when-DigiD-login-is-cancelled

Conversation

@Dpragt
Copy link
Copy Markdown
Contributor

@Dpragt Dpragt commented Apr 13, 2026

#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.

DPlevel added 2 commits April 13, 2026 14:38
#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants