OpenID Connect with Auth0

Authenticate headless service consumers using Auth0’s identity provider.

This example uses a client credentials grant as it is non-interactive, and because we expect clients to authenticate on behalf of themselves, not an end-user.

Prerequisites

  • Auth0 API configured with the openid scope. Find your issuer URL and audience in your Auth0 API configuration.

  • Your client is authorized to access your API. After client creation in Auth0, set the client to Authorized, expand its authorization settings, and enable the openid scope.

  • A Gateway Service with the url configured to match your Auth0 API Identifier.

Environment variables

  • ISSUER: The issuer authentication URL for your IdP. For Auth0, that typically looks like this: https://$AUTH0_API_NAME.auth0.com/.well-known/openid-configuration.

  • AUTH0_API_IDENTIFIER: Auth0’s token endpoint requires passing the API identifier in the audience parameter, which must be added as a custom argument.

Set up the plugin

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!