How do I redirect a user back to a specific end user page or form after SSO authentication?
Customer Portal Single Sign-On
Users always land on Customer Portal homepage after SSO authentication.
We want the users to be redirected to the original page they tried to visit.
By default, customer portal does not process the relay state or support deep linking. If you want to redirect the user to a specific page after authentication you have two options;
- Pass the redirect in the ACS URL. By default, the user will be directed to the Home page after authentication. You can specify a different page to direct the user after authentication. Please see How You Redirect Contacts After Login.
- The other option is to create a pre_login hook to intercept the SAML response and parse out the relay state.
If you redirected to your identity provider from a Customer Portal page using the configuration setting PTA_EXTERNAL_LOGIN_URL, you can pass the page the user tried to visit to your IdP with %next_page%, as in
Consult the documentation for your identity provider to determine the necessary settings to return the redirect as above. See also the description of PTA_EXTERNAL_LOGIN_URL within the configuration setting editor.