Prerequisites
@dynamic-labs-sdk/clientinitialized- External auth (BYOA) configured with a JWKS URL in your dashboard
- The user is already signed in via external auth
How it works
- Your backend creates an assertion JWT signed with the same key registered in your environment’s JWKS URL.
- The SDK sends this JWT to Dynamic’s backend, which validates the signature and issues an elevated access token.
- The elevated token is automatically stored in SDK state and attached to subsequent API calls — no manual token handling is needed.
Assertion JWT requirements
Your backend must sign a JWT with the following claims:
Example payload:
Usage
Combining with checkStepUpAuth
You can use checkStepUpAuth to determine whether step-up is required before calling your backend:
When to use external auth vs. other methods
Both approaches produce the same elevated access token and are stored and consumed identically by the SDK.
React
UseuseRequestExternalAuthElevatedToken for the token exchange and call the one-shot checkStepUpAuth check directly inside the button handler:
Related
- Step-Up Authentication Overview — Concepts, scopes, token lifecycle
- Bring Your Own Auth — Configuring external auth
- JavaScript SDK Step-Up Guide — Re-auth and MFA methods