Prerequisites
- You need to have the Dynamic client initialized.
- You need to have device registration enabled in your environment’s settings in the Dynamic Dashboard.
- You need to have universal links configured for your app.
- React Native SDK v5 or later.
Using our UI
Device registration is handled automatically by the SDK. When a user signs in from an unrecognized device, the SDK displays a security prompt with the user’s email, asking them to verify the device. Once the user taps the verification link in their email, the SDK detects the deep link, completes registration, and dismisses the prompt automatically. No additional code is needed — just enable device registration in your dashboard.Using your UI
To build a custom device registration experience, disable the built-in modal in your client configuration:React Native
Checking if device registration is required
Listen for authenticated user changes and check if the user’s scopes includedevice:register.
React Native
Handling device registration completion
The SDK handles the universal link redirect and device registration completion automatically, even when the built-in modal is disabled. You can listen for completion to update your UI:React Native
Getting registered devices
Retrieve all trusted devices for the current user. Each device includes a pre-parseddisplayText and type for easy display.
Each device includes:
| Field | Type | Description |
|---|---|---|
id | string | The device registration ID |
createdAt | string | ISO date of when the device was registered |
displayText | string | null | A friendly device name (e.g., “iPhone”) |
type | 'mobile' | 'desktop' | null | The device type |
isCurrentDevice | boolean | Whether this is the device making the request |
React Native
Revoking a device
Remove a single trusted device. If the revoked device is the current device, the user will be logged out.React Native
Revoking all devices
Remove all trusted devices for the current user. This always logs the user out.React Native
Related
- Device Registration Overview — How device registration works and why it matters
- Universal Links — Set up universal links for your app
- React SDK Device Registration — Web implementation with React hooks
- Security Overview — Dynamic’s security posture