Skip to main content

Recommended: JavaScript SDK for React Native

While this SDK is still supported, we recommend using newer JavaScript SDK, which is optimized for React Native, but also comes with a host of other benefits.
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.

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 include device: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-parsed displayText and type for easy display. Each device includes:
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
Last modified on July 24, 2026