How to redirect to a custom help page instead of the default Authentication failed error message in OIDC SSO?

0
Hi everyone, I'm currently implementing OIDC SSO in my Mendix app.When authentication fails, the following default message is displayed: "Authentication failed! Please check with your System Administrator." However, instead of showing this generic error message, I would like to redirect the user to a custom help page (e.g., /p/authhelp) that provides instructions or links to resolve the issue (e.g., missing client ID, incorrect redirect URI, etc.). I’ve looked into the ACT_ShowCustomExceptionMessage microflow, and I can see the redirectTo parameter is being used with /error-page.html, but I’m unsure how to replace this with a custom Mendix page. Here’s what I’ve tried so far: Created a new page (e.g., Page_AuthHelp) under a custom module Set page URL to authhelp Made it accessible to anonymous users Tried setting redirectTo to /p/authhelp Unfortunately, it just redirects back to the home page or shows “page not found.”Is there a correct way to do this in Mendix Cloud or when running locally? Any help or guidance would be greatly appreciated! Thank you in advance.
asked
1 answers
0

Redirect to Custom Help Page on OIDC Login Failure – Simple Steps

  • Create a Mendix Page

    • Name it Page_AuthHelp, set the URL as /authhelp

    • Enable anonymous access to this page in project security

  • Update OIDC Error Handler

    • Open the ACT_ShowCustomExceptionMessage microflow from the OIDC module

    • Find the constant or variable that sets the redirect URL

    • Set its value to /p/authhelp (Mendix requires /p/ before page URLs)

  • Deploy and Test

    • Test an invalid login scenario; user should be redirected to the /p/authhelp page

  • Additional Notes

    • Clear browser cache or test in incognito if redirect doesn’t work

    • Ensure the module where Page_AuthHelp resides allows anonymous users

    • Avoid using popups or restricted pages in the redirection path

answered