core-plugin-api package comes with an Auth0 authentication
provider that can authenticate users using OAuth.
Create an Auth0 Application
- Log in to the Auth0 dashboard
- Navigate to Applications
- Create an Application
- Name: Backstage (or your custom app name)
- Application type: Single Page Web Application
- Click on the Settings tab
- Add under
Allowed Callback URLs:
The provider configuration can then be added to your
app-config.yaml under the
The Auth0 provider is a structure with these configuration keys:
clientId: The Application client ID, found on the Auth0 Application page
clientSecret: The Application client secret, found on the Auth0 Application page
domain: The Application domain, found on the Auth0 Application page
It additionally relies on the following configuration to function:
session.secret: The session secret is a key used for signing and/or encrypting cookies set by the application to maintain session state. In this case, 'your session secret' should be replaced with a long, complex, and unique string that only your application knows.
Auth0 requires a session, so you need to give the session a secret key.
audience: The intended recipients of the token
connection: Social identity provider name. To check the available social connections, please visit Auth0 Social Connections.
connectionScope: Additional scopes in the interactive token request. It should always be used in combination with the
Adding the provider to the Backstage frontend
To add the provider to the frontend, add the
auth0AuthApi reference and
SignInPage component as shown in
Adding the provider to the sign-in page.