subject_token when creating the customer. GnosisRamp verifies the token and binds the customer to the identity provider’s user.
Request flow
Send the user's subject token
Call
POST /customers with a unique id and the OIDC subject_token. GnosisRamp verifies the issuer, signature, allowed audiences, and skew settings you configured in the dashboard.cURL
Configuring Your Identity Provider
Before using token exchange, register your identity provider in the GnosisRamp dashboard:- Navigate to your project settings.
- Add the provider’s issuer URL and allowed audiences.
- GnosisRamp will fetch the provider’s JWKS and use it to verify incoming tokens.
When to Use External Auth
| Scenario | Approach |
|---|---|
| You have an existing login system (Auth0, Firebase, etc.) | Use subject_token to link customers to your IdP |
| You manage user identity yourself | Use basic customer creation with just id |
| Your users authenticate with Ethereum wallets | Use GnosisPay Wallet Authentication |
Error handling
| Status | When it fires | How to resolve |
|---|---|---|
401 Unauthorized | Missing/invalid Basic auth or the subject token fails issuer/audience checks. | Verify credentials and ensure the identity provider is registered in GnosisRamp. |
400 Bad Request | id missing or empty, or token validation failed. | Check that the subject_token is a valid JWT from a registered provider. |
Using the GnosisRamp JWT
- Include it on every authenticated call:
Authorization: Bearer <access_token>. - Tokens inherit the expiration of the subject token plus any TTL you configured. Re-run the exchange when you receive
401 Unauthorized. - Generate one token per active session; do not share JWTs between customers.