Prerequisites
DynamicSDKinitialized with your environment ID (see Quickstart)- Device registration enabled in your environment’s settings in the Dynamic Dashboard
- Universal links configured for your app to handle email verification redirects
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 that updates when the SDK detects an unrecognized device during authentication.
Getting registered devices
Retrieve all trusted devices for the current user. Each device includes metadata for 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? | A friendly device name (e.g., “iPhone”) |
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 SwiftUI screen for managing trusted devices:Related
- Device Registration Overview — How device registration works and why it matters
- Step-up Authentication — Require re-verification before sensitive actions
- Session Management — Manage authenticated sessions
- Security Overview — Dynamic’s security posture