Skip to main content
If your app already authenticates users (via Firebase, Auth0, Supabase, or a custom system), you can skip the AIR Kit login method picker and pass the authenticated user into an AIR Kit session. This is called Custom Auth.

How it works

  1. Your app authenticates the user through your own system.
  2. Your backend signs a Partner JWT containing the user’s email.
  3. Your frontend passes that JWT to airService.login({ authToken }).
  4. AIR Kit creates or loads the user’s AIR Account, without showing the login method picker.
Custom Auth is often a JWT followed by an email one-time password, not a silent login. By default, the first time a user signs in to your app, AIR Kit asks them for a code sent to that email. Later logins to your app with that email skip this step.

Prerequisites

  • AIR Kit SDK installed and initialized. See Web SDK.
  • A Partner JWT signing key, with its public key published through a registered JWKS endpoint.
  • The authenticated user’s email address available on your backend.

Step 1: Generate a Partner JWT on your backend

Include email and partnerId:

Step 2: Fetch the token and log in on the frontend

The user is now logged in without the AIR Kit login method picker, apart from the email OTP the first time they sign in to your app. Their AIR Account is tied to the email from your system.

Step 3: Use AIR Kit features normally

After login, all SDK methods work as usual — issue credentials, verify credentials, access smart accounts:

Next steps