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 home page 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. Users will always be redirected to the page specified in the redirect.
- The other option is to create a pre_login hook or post_login hook to intercept the SAML response and parse out the relay state. Relay states are not looked at in Customer Portal unless a customization is built. If you build this type of customization, users will be redirected to the exact page they were originally trying to access after they authenticate with the identity provider.