OneLogin Authentication Provider
The Backstage core-plugin-api package comes with a OneLogin authentication
provider that can authenticate users using OpenID Connect.
Create an Application on OneLogin
To support OneLogin authentication, you must create an Application:
- From the OneLogin Admin portal, choose Applications
- Click
Add Appand selectOpenID Connect- Display Name: Backstage (or your custom app name)
- Click Save
- Go to the Configuration tab for the Application and set:
Login Url:http://localhost:3000Redirect URIs:http://localhost:7007/api/auth/onelogin/handler/frame
- Click Save
- Go to the SSO tab for the Application and set:
Token Endpoint>Authentication Method:POST
- Click Save
Configuration
The provider configuration can then be added to your app-config.yaml under the
root auth configuration:
auth:
environment: development
providers:
onelogin:
development:
clientId: ${AUTH_ONELOGIN_CLIENT_ID}
clientSecret: ${AUTH_ONELOGIN_CLIENT_SECRET}
issuer: https://<company>.onelogin.com/oidc/2
## uncomment to set lifespan of user session
# sessionDuration: { hours: 24 } # supports `ms` library format (e.g. '24h', '2 days'), ISO duration, "human duration" as used in code
signIn:
resolvers:
# See https://backstage.io/docs/auth/onelogin/provider#resolvers for more resolvers
- resolver: usernameMatchingUserEntityName
The OneLogin provider is a structure with three configuration keys; these are found on the SSO tab for the OneLogin Application:
clientId: The client IDclientSecret: The client secretissuer: The issuer URL