0

I have implemented Onelogin SAML PHP Toolkit successfully; however, I am looking for a way to automatically redirect the user to a custom url after accepting the push notification instead of being automatically redirected to the Onelogin App Portal.

Currently, the login experience behaves like the below steps:

  1. Access my custom app and I am automatically redirected to the Onelogin login page
  2. After entering username/password, I am presented with Onelogin Protect push notification on my phone
  3. Once I accept the push notification, I am automatically redirected to the Onelogin App Portal
  4. Once I select the App in the portal, I am redirected to the custom app.

Is there anyway to allow the user to automatically redirect to an external/custom url after successful login and "accepting" the push notification?

thank you

Tony

TboneDubu
  • 1
  • 2

1 Answers1

0

You can use RelayState parameter while sending the Authentication Request.
Once the authentication is done, IdP will send back this RelayState value along with the SAML Response.

This RelayState value can be the actual url you want to redirect to, or you can use an identifier, against which you are maintaining some additional details at SP side (redirection url, location, additional parameters, etc).
On receiving this value from IdP (post authentication), extract the details from db against this id, and redirect to the url.

Also check this thread for more details about RelayState.