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
localId is the UID to create the customer
with.
masivo_customer_id. The claim shows up once the
token refreshes, so call getIdToken(true).
- Issuer:
https://accounts.google.com - Audience:
1234567890-abc.apps.googleusercontent.com
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.
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
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:
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
(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
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
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
httpsURL that serves/.well-known/openid-configuration, or you set a publichttpsJWKS URL; - tokens are signed with RS256 or ES256, not an HS256 secret;
- the chosen claim only contains letters, digits,
_and-.
user_2abc…) work as is. Apple’s sub contains dots, so it
needs a custom claim or Firebase in front.