Skip to main content

Auth0

Auth-svc validates JWTs issued by your identity provider, this guide covers how to setup Auth0 as your IDP.

If you want to use a different identity provider (eg, Okta, Keycloak), refer to the the custom JWT provider instructions in the auth-svc repository.

Create an Auth0 account and application

  1. Sign up at auth0.com — the free tier is sufficient for development.

  2. Go to ApplicationsCreate Application.

    • Choose Native as the application type (required for mobile).
    • Note down the Domain and Client ID.
  3. Under your application's Settings, scroll to Advanced SettingsGrant Types and make sure Refresh Token is enabled.

Create an API

  1. Go to ApplicationsAPIsCreate API.
  2. Set a Name (e.g. auth-svc-api) and an Identifier — this is a logical name, not a real URL (e.g. silent-shard-boilerplate). The identifier becomes your AUTH0_AUDIENCE.
  3. In the API's Settings tab, enable Allow Offline Access.
  4. Under the Permissions tab, add the following custom scopes:
ScopeDescription
write:backupCreate / update keyshare backups
read:backupRetrieve keyshare backups
read:transactionsView transaction history
write:devicesRegister / update devices
read:devicesView registered devices
write:faceRegister face biometric
read:faceView face registration status

Optional: Enable Google SSO

  1. Go to AuthenticationSocialCreate ConnectionGoogle / Gmail.
  2. Provide your Google OAuth web client credentials.
  3. Enable the connection for your Native application.

Optional: Enable Passkey

  1. Go to AuthenticationPasswordless.
  2. Enable Passkey and follow the setup wizard.

Environment variables

VariableValueDescription
AUTH0_DOMAINyour-tenant.auth0.comYour Auth0 tenant domain
AUTH0_AUDIENCEsilent-shard-boilerplateMust exactly match the API Identifier above
AUTH0_ALGORITHMSRS256JWT signing algorithm

AUTH0_AUDIENCE must exactly match the Identifier set in your Auth0 API. A mismatch causes all JWT verification to fail.