How to redirect a SAML 2 webapp to a localhost callback URL

Ready to post? :magnifying_glass_tilted_left: First, try searching for your answer.
Hi,
My use case is:
I have an application which is integrated with Oauth0 using SAML. I want to test the login functionality locally => therefore I want Oauth0 SAML to redirect the response to my localhost.
Basically I has “MyApp” <==> serviceProvider <==> Oauth0 SAML (identity provider).
MyApp runs locally.

I have setup an application in Oauth0 account => I have added “Saml 2” adds-on.
I have pust the local URL in the “Allowed Callback URL” setting.

The issue is that the Oauth0 SAML redirects the SAML response to the remote server and NOT to the local server/App.

Can I get help, please?

Hi @appid.development

Welcome to the Auth0 Community!

For the Allowed Callback URL inside the IdP tenant Application and SAML2 Add-on, you need to set it as https://{{SP-Tenant-Domain}}/callback.

Basically, the set up would be something like this:

  • MyApp which is created on the SP Tenant
  • IdP App which is created on the IdP Tenant (OAuth0 SAML IdP in your case)
  • Set up SAML2 Add-On on the IdP App and set the Callback URL to the https://{{SP-Tenant-Domain}}/callback
  • IdP app logout and web origin URLs set to the local host (ex: http://localhost:3000

By doing this, you should have available in your network trace the SAML Response under callback.

If you have any other questions, let me know!

Kind Regards,
Nik

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.