checkUserScopes
Checks whether a user has all the specified scopes.
Dynamic assigns scopes to users as they satisfy requirements — for example, user:basic is granted once a user completes MFA, device registration, and required fields. checkUserScopes lets you verify that a user holds any set of scopes you need.
Parameters
Returns
boolean — true if the user has every scope in scopes, false otherwise.
What is user:basic?
user:basic is the scope Dynamic grants once a user has satisfied all Dynamic-controlled requirements:
- Required fields (KYC) filled
- MFA authentication completed (if configured)
- Recovery codes acknowledged (if MFA is enabled)
- Device registered (if required)
This is the scope that gates embedded wallet creation and other privileged operations on the backend.
Composing your own readiness check
“Is the user ready?” is your app’s business logic — not ours. Dynamic only controls the user:basic gate. Everything else — wallets connected, NFTs held, plans activated, terms accepted — is yours to compose.
Use checkUserScopes as a building block alongside your own conditions:
Deprecation of isUserOnboardingComplete
isUserOnboardingComplete is deprecated. Use checkUserScopes({ user, scopes: ['user:basic'] }) instead.
isUserOnboardingComplete checked the same Dynamic-controlled requirements that user:basic represents, but its name implied it could tell you whether a user had “completed onboarding” — which is inherently app-specific. The replacement makes the contract explicit: you check scopes, and you decide what “ready” means for your app.
Migration:
Checking individual requirements
If you need finer-grained checks (for example, to show specific UI for each pending step), you can still use the individual helpers: