Recommended: JavaScript SDK with React Hooks
For new React apps, we recommend the JavaScript SDK with React Hooks (
@dynamic-labs-sdk/react-hooks) instead of the legacy React SDK documented here. The JS SDK comes with many benefits such as a much smaller bundle size and other optimizations. Use the React quickstart (JavaScript SDK) to get started.This guide is currently React only.
- Navigate to the Log in & User Profile page of the developer dashboard.
- In the Email & Phone Number Selection, toggle both on and click the gear icon to the right of each one.
- Check the boxes for either or both OTP Verification and/or Uniqueness to enable them.
- Click the ‘Save Changes’ button to save your changes.
General Setup
Configure verification and uniqueness in the dashboard. This applies whichever UI approach you use.- Open Log in & User Profile settings
- In Email & Phone Number, toggle fields on, click the gear icon
- Enable OTP Verification and/or Uniqueness
- Save changes
Using our UI
If verification is enabled, users are automatically prompted to verify email/phone during onboarding, and when changing these values later in their profile.Using your UI
Trigger verification and handle OTP programmatically. UseuseUserUpdateRequest to update fields; if verification is required, complete OTP.
React
Twilio Credentials for enabling additional countries
By default, Dynamic uses its own Twilio credentials with United States and Canada enabled. To support additional countries, add your own Twilio credentials:- Open the configure dialog and turn off “Use Dynamic’s credentials”
- Enter your Twilio credentials
- Add the additional countries you want to support
- Also enable the same countries in your Twilio account; we cannot read your Twilio configuration