Skip to content
Client SDK
Mobile approve
SSO
Sub-journey

Creates or updates a Device entity and cryptographically binds the device to the user.

Note

This step replaces the Register Device (deprecated) step. Existing journeys remain fully supported and can continue to operate without changes.

Description

This step performs two things simultaneously: it creates or updates the Device entity in Mosaic, and it cryptographically binds the device to the user using the client SDK.

The SDK automatically generates a cryptographic key pair – no user interaction required. The public key is exported to Mosaic while the private key remains on the device, providing secure, spoof-resistant device identification without relying on cookies or device fingerprinting.

The Device entity is identified by a device_id. If a device_id is provided (for example, from Mosaic Fraud Prevention or externally), it is used to create or update the Device entity. If no device_id is provided, the SDK-generated device ID is used as the fallback device_id.

If the step is initiated for an already registered device or existing cryptographic keys, the corresponding Device entity and device cryptographic keys are updated accordingly.

Upon registering a device, the step outputs deviceInfo which is also added to the journey context for use in subsequent steps. For example, to validate that the device is known and trusted during authentication. This ensures that the user is always using a recognized device, enhancing security and user experience.

Note

Registering a device should generally occur after user authentication to avoid associating devices with unconfirmed identities. The only exception is during user onboarding, where the user and device are registered together.

Configuration

FieldDescription
User auth stateIndicates if the user has authenticated in this journey. If the user is authenticated (default), the user context is provided implicitly by the journey. If not, a user identifier must be configured.
IdentifiersOnly configured if the journey doesn't authenticate the user before invoking this step. Can be an external user ID, email, phone number, username, or a custom identifier, if configured for B2C users in your tenant.
Display nameSets a user-friendly name for the device.
Custom dataYields a JSON object containing the device's data.
Device IDSets a Device ID to use when registering the device. If left empty, the Device ID will be taken from the SDK automatically.
Error output variableName of the variable that stores any errors returned by step.
Output variableVariable used to store the step output — the device object and the device_key_id (device cryptographic key identifier) — which can be used in subsequent journey steps.
Failure behaviorDetermines the behavior in case of failure, which either aborts the journey (default) or proceeds to a failure branch of the control flow.
Journey event data

This step can be configured to record step input and output data, or a custom payload, which is then surfaced in journey events in Journey Analytics for diagnostic purposes. For details, see Additional data reporting.