Auth0 is an authentication and authorization service that lets you easily provide single sign-on services. One of the neat things about Auth0 is that you can use other services, such as Azure and Dropbox, as the source of the user accounts. Integrating Auth0 into your OutSystems application makes it much faster for your users to log in to your application because they will have fewer accounts to manage and do not need to go through a lengthy signup process with your application. Even better, it only takes a few minutes to implement Auth0 in your application.

The Steps You Need to Take

The trick to this quick integration is that Auth0 supports the SAML protocol and the IdP component in the OutSystems Forge implements this protocol, The only work needed is the configuration of IdP and the modification of your application so it can use it. Here are the steps:

  1. Get IdP from the Forge and publish it to your server. You can install it directly through Service Studio.
  2. Modify your application to use IdP as per the instructions in IdP, found at https://hostname/IdP/Instructions.aspx (use your hostname) after installation on the server.
  3. Sign up for an Auth0 account.
  4. Turn on and configure SAML in your Auth0 account. There are no “gotchas” here.
  5. Set up the generic SAML IdP connection in Auth0. One place that might confuse you is what the “Application Callback URL” should be. Use the value https://hostname/IdP/SSO.aspx (filling in the correct hostname for your server).

    setting up aut0 authentication
  6. Go to the Usage tab of Auth0’s SAML configuration to get the information needed for your IdP Configuration page (https://hostname/IdP/Configuration.aspx).
    setting up aut0 authentication
  7. Configure your users in Auth0.
  8. Test!

One thing that you will note, is that when someone logs in via IdP, it will create a user account for them in OutSystems, but it will also not bring over user information such as name into the OutSystems User record. Your workflow should likely drive people to provide their details after login until they complete enough information for your application to work as expected.

Making Life Easier

Bringing Auth0 into an OutSystems application is a great way to make life easier for your users, especially in an application open to the public or self-signup scenarios.