Authenticating consumer requests with a partner-signed JWT.
When a user opens the webview (or hits any /me/* endpoint directly), they
present a JWT signed by your app. We verify it using the public key you
publish via jwksUrl or supply as a static jwtPublicKey.
If you skip the POST /integrations/users step entirely, we’ll create the
user the first time a JWT for an unknown sub arrives (“just-in-time”
provisioning). These optional claims populate the new row:
Claim
Maps to
Notes
email
email
displayNameorname
displayName
displayName wins if both present.
phone
phone
countryCodeorcountry
countryCode
First two chars, uppercased.
locale
locale
JIT works, but the recommended pattern is to upsert the user from your
backend before opening the webview. That way you can correct stale data
(e.g. user changed their email) and you don’t depend on JWT claims for PII
integrity.
If you set jwksUrl, we fetch the JWK set on each unique kid we haven’t
seen, with internal caching. To rotate:
Publish the new key alongside the old one at your JWKS URL.
Start signing new JWTs with the new kid.
Wait for any in-flight tokens signed with the old key to expire.
Remove the old key from your JWKS.
We don’t pin keys, so no admin action is needed on our side.If you supply a static jwtPublicKey instead, rotation requires an admin
update to your partner record. JWKS is preferred for production.