Authenticating with Auth0
So far, the authentication mechanism is built in within the application. Maintaining such a system might be a bottleneck in the long run, which is why you might need to consider an external service such as Auth0. This is an all-in-one authentication solution that gives you access to powerful reporting and analytics as well as a role-based access control (RBAC) system.
To get started, follow these steps:
- Create a free account (https://auth0.com/signup). Once created, set up a tenant domain in the region where you're located, as illustrated in the following screenshot:
- Then, create a new API called
Recipes API
. Set the identifier to https://api.recipes.io
and the signing algorithm toRS256
, as illustrated in the following screenshot: - Once the API is created, you need to integrate the Auth0 service into the API. Download the following Go packages:
go get -v gopkg...