Device registration protects your users from account takeovers by requiring verification when they sign in from an unrecognized device. For a general overview of the feature, see Device Registration.Documentation Index
Fetch the complete documentation index at: https://docs.dynamic.xyz/docs/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
DynamicSDKinitialized with your environment ID (see Quickstart)- Device registration enabled in your environment’s settings in the Dynamic Dashboard
- Deep links configured for your app to handle email verification redirects
- Flutter SDK v1.2.7 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
Checking if device registration is required
TheDeviceRegistrationModule provides a reactive isDeviceRegistrationRequired property and a Stream<bool> that updates when the SDK detects an unrecognized device during authentication.
Getting registered devices
Retrieve all trusted devices for the current user. Each device is returned as aRegisteredDevice with the following fields:
| Field | Type | Description |
|---|---|---|
id | String | The device registration ID |
createdAt | String | ISO date of when the device was registered |
displayText | String? | A friendly device name (e.g., “iPhone 15”) |
type | String? | The device type (e.g., "mobile", "desktop") |
isCurrentDevice | bool? | Whether this is the device making the request |
Revoking a device
Remove a single trusted device. If the revoked device is the current device, the user will be logged out.Revoking all devices
Remove all trusted devices for the current user. This always logs the user out.Full example
Here’s a complete Flutter screen for managing trusted devices:API reference
DeviceRegistrationModule
| Member | Description |
|---|---|
isDeviceRegistrationRequired | bool — Current state of whether device registration is required |
isDeviceRegistrationRequiredChanges | Stream<bool> — Reactive stream of state changes |
getRegisteredDevices() | Returns Future<List<RegisteredDevice>> of all trusted devices |
revokeRegisteredDevice({deviceRegistrationId}) | Revokes a specific device |
revokeAllRegisteredDevices() | Revokes all trusted devices — logs the user out |
Related
- Device Registration Overview — How device registration works and why it matters
- Step-up Authentication — Require re-verification before sensitive actions
- Security Overview — Dynamic’s security posture