Skip to main content
Any OpenID Connect provider works as long as it signs ID tokens with asymmetric keys (RS256 or ES256) published in a JWKS. The dashboard ships presets for the six below. Read Integrate with OAuth first. Every provider follows the same steps:
1

Get the issuer and audience

Copy them from the provider console. They must equal the iss and aud of a real ID token; decode one at jwt.io to check.
2

Create the OAuth app

Go to Settings → OAuth → Apps → New app, pick the provider preset and replace every <placeholder>.
3

Choose the Customer ID claim

Keep sub or use a custom claim. Its value may only contain letters, digits, _ and -.
4

Create the customers

From your backend, create each customer in Masivo with the claim’s value as its ID.
5

Exchange the ID token

After sign-in, call POST /api/storefront/v1/oauth/exchange with the ID token.

Firebase

Values. Firebase Console → Project settings → General → Project ID. The same value goes in both fields.
  • Issuer: https://securetoken.google.com/my-project
  • Audience: my-project
  • JWKS URL: empty
Every sign-in method enabled in Authentication → Sign-in method (email, Google, Apple…) issues the same Firebase ID token, so one OAuth app covers them all. ID token.
Testing without an app. Use the REST API with the Web API key from Project settings. The response’s localId is the UID to create the customer with.
Custom claim. Set it from your backend with the Admin SDK, then set Customer ID claim to masivo_customer_id. The claim shows up once the token refreshes, so call getIdToken(true).

Google

Use this preset for Sign in with Google without Firebase. With Firebase, use the Firebase preset: the token your app gets is Firebase’s. Values. Google Cloud Console → APIs & Services → Credentials → OAuth 2.0 Client IDs.
  • Issuer: https://accounts.google.com
  • Audience: 1234567890-abc.apps.googleusercontent.com
The audience is the client the token was issued for. On Android and iOS, Google Sign-In issues it for the Web client ID you pass as webClientId / serverClientId, not the Android or iOS client. ID token. @react-native-google-signin/google-signin: (await GoogleSignin.signIn()).data?.idToken. On the web, the credential returned by Google Identity Services. Testing without an app. In the OAuth 2.0 Playground authorize the openid email scopes and copy the id_token. Its audience is the Playground’s own client ID. Revoke the Playground’s access at myaccount.google.com/permissions afterwards. Custom claim. Google doesn’t support custom claims; use sub.
Some Google ID tokens carry iss: accounts.google.com, without https://. The issuer must be an https URL, so those tokens fail with invalid_grant.

Auth0

Values. Auth0 Dashboard → Applications → your app → Settings: Domain and Client ID.
  • Issuer: https://my-tenant.us.auth0.com/ (keep the trailing slash; with a custom domain, https://login.example.com/)
  • Audience: the Client ID
ID token. react-native-auth0: (await auth0.credentialsManager.getCredentials()).idToken. On the web (@auth0/auth0-spa-js): (await auth0.getIdTokenClaims())?.__raw. Custom claim (required). Auth0’s sub looks like auth0|abc123 and | is not allowed in a customer ID. Add a claim with a post-login Action:
Set Customer ID claim to https://masivo.ai/customer_id.

Supabase

Values. Supabase Dashboard → Project Settings → General → Project ID (the project ref).
  • Issuer: https://abcdefghijklmnop.supabase.co/auth/v1
  • Audience: authenticated
  • JWKS URL: https://abcdefghijklmnop.supabase.co/auth/v1/.well-known/jwks.json
The project needs asymmetric JWT signing keys (Project Settings → JWT Keys). Projects that only have the legacy HS256 JWT secret publish no keys, and the exchange fails with invalid_grant.
ID token. Supabase has no separate ID token; exchange the session’s access token: (await supabase.auth.getSession()).data.session?.access_token. Custom claim. Add masivo_customer_id with a Custom Access Token Hook (Authentication → Hooks).

Amazon Cognito

Values. AWS Console → Cognito → User pools → your pool: the User pool ID (us-east-1_AbC123) and its region. Under App clients, the Client ID.
  • Issuer: https://cognito-idp.us-east-1.amazonaws.com/us-east-1_AbC123
  • Audience: the app client ID
ID token. Use the ID token, not the access token: Cognito access tokens have no aud. With Amplify: (await fetchAuthSession()).tokens?.idToken?.toString(). Custom claim. Create the custom:masivo_id attribute, let the app client read it, and set Customer ID claim to custom:masivo_id. A Pre token generation trigger works too.

Microsoft Entra ID

Values. Azure Portal → Microsoft Entra ID → App registrations → your app → Overview: Application (client) ID and Directory (tenant) ID.
  • Issuer: https://login.microsoftonline.com/<tenant-id>/v2.0
  • Audience: the Application (client) ID
Multi-tenant apps (common, organizations) get a different iss per tenant, so they need one OAuth app per tenant. ID token. MSAL: result.idToken from loginPopup or acquireTokenSilent, with the openid scope. Which claim. sub differs for each app registration. If several apps must reach the same customer, use oid (the user’s ID in the tenant). For your own ID, add an optional claim or extension attribute under Token configuration.

Other providers

Okta, Keycloak, Clerk, Apple and other OIDC providers work when:
  • the issuer is a public https URL that serves /.well-known/openid-configuration, or you set a public https JWKS URL;
  • tokens are signed with RS256 or ES256, not an HS256 secret;
  • the chosen claim only contains letters, digits, _ and -.
Clerk user IDs (user_2abc…) work as is. Apple’s sub contains dots, so it needs a custom claim or Firebase in front.