Auth0 Authentication Example
This is a quick guide on setting up Backoffice authentication with Auth0.
Prerequisites
In this example, you will need the following NuGet package
Setting up Ucommerce Backoffice
Setting up Ucommerce backoffice with Auth0 requires you to set up an external authentication scheme and external claims mapper when calling .AddBackOffice()
To set up the authentication, use a helper method from the Auth0 package to add all the required services via the AuthenticationBuilder. We highly recommend looking into some of these methods, as they do much of the groundwork to set up OpenID.
Remember to create your external claims mapper to map the claims from Auth0 to Ucommerce.
Create your Auth0 application
Create your application in the Auth0 Dashboard.
When the application is created, update appsettings.json
to keep track of Domain
and ClientId
.
For further guidance on setting up Auth0, we recommend the Auth0 Quickstart Guide.
Related Articles
Last updated