Introduction
Auth0 is a platform for identity management that supports security in applications and microservices in single sign-on processes with Identity, Access Management offering authentication and authorization integrated with the Devprime platform. This integration is done by the Security adapter.
Follow the steps below to prepare the on-premises environment and perform the basic co-configurations in Auth0 to enable on-premises integration tests with the security engine.
Cheklist and preperation of the initial environment:
- Open an account on Devprime Platform and purchase a Developer/Enterprise) license.
- Install an updated version of .NET (Linux, macOS, and Windows)
- Install and/or update Visual Studio Code and/or Visual Studio 2023 Community / Professional / Enterprise.
- Install and/or update docker (For Windows, use WSL2).
- Initialize the MongoDB and RabbitMQ containers in docker and add the queue ‘orderevents’ in RabbitMQ.
- Install and activate the latest version of the Devprime CLI.
- Create a folder for your projects and set read and write permissions.
- See the article “Creating the first microservice” to explore getting started with the Devprime platform.
- Create a Host account on Auth0.com.
Creating an Application in Auth0
After creating the account in Auth0, you will be directed to a private area within the portal with several options for configuration. The first option to be located is the “Applications” menu and then the “Create application” option, which should provide any node as “ms-order” and the type as “Regular Web Applications”
At the end, a new “Application” will be created and we will perform some configurations and then use the data in the local microservice to validate the authentication.
Getting the Settings of an Application in Auth0
Now it’s time to get the Auth0 configuration information for use in our application and for that it is necessary to access the “Application > ms-order” and the option
“Basic Information” get the values of “Domain, Client ID, Client Secret”
Item | Value |
---|---|
Domain | dev-q5z4w4ipzhz581g3.us.auth0.com |
Client ID | a15W9T9UzEA05hcRMM3x4ckfiEzD6CJo |
Client Secret | -hQtloE4YIF4oJD5cbhDrSVjbZ5IlF-x-UPgeTUZLZArxTRcyHwff6eu5b4IpkHZ |
Then locate “Application URIs”, locate the Allowed Call Backurl, Allowed Logout Backurl, and Allowed Web Origins keys and include the values shown in the table
Item | Value |
---|---|
Allowed Call Backurl | https://localhost:5001/callback,http://localhost:5000/callback |
Allowed Logout Backurl | https://localhost:5001, http://localhost:5000, https://localhost:5001/home/index, http://localhost:5000/home/index |
Allowed Web Origins | http://*, https://* |
In the same form you will find the option “Cross-Origin Authentication”
which can also be filled in with the values “http://*, https://*”.
This is the important moment that you need to save the settings made in the
Auth0.
Next Steps:
Last modified January 10, 2024 (967dcac3)