Skip to main content
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.
  • JavaScript SDK v2 or later.

Checking if device registration is required

After a user authenticates, check whether their current device needs to be registered. This is determined by the device:register scope in the user’s session.

Completing device registration

When the user clicks the verification link in their email, they are redirected back to your app with a token in the URL. You need to detect this redirect and complete the registration.

Listening for events

You can listen for device registration events to update your UI accordingly.

Getting registered devices

Retrieve all trusted devices for the current user.
Each device includes:

Displaying devices

You can use parseUserAgent to display a friendly device name from the raw user agent string.

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.
Last modified on June 24, 2026