register

suspend fun register(userId: String, activationToken: String, pinProvider: PinProvider, pushNotificationsToken: String? = null): MIRACLResult<User, RegistrationException>

Provides end-user registration. Registers an end user for a given MIRACL Trust Project to the MIRACL Trust platform.

Return

A MIRACLResult representing the result of the registration:

Parameters

userId

The identifier of the user.

activationToken

Provides an activation token for verification.

pinProvider

A callback called by the SDK when the PIN is requested.

pushNotificationsToken

The current device's push notifications token. This is used when push notifications for authentication are enabled in the platform.


fun register(userId: String, activationToken: String, pinProvider: PinProvider, pushNotificationsToken: String? = null, resultHandler: ResultHandler<User, RegistrationException>)

Provides end-user registration. Registers an end user for a given MIRACL Trust project on the MIRACL Trust platform.

Parameters

userId

The identifier of the user.

activationToken

Provides an activation token for verification.

pinProvider

A callback called by the SDK when the PIN is requested.

pushNotificationsToken

The current device's push notifications token. This is used when push notifications for authentication are enabled in the platform.

resultHandler

A callback to handle the result of the registration.

  • If successful, the result is a MIRACLSuccess with the value of the registered user.

  • If an error occurs, the result is a MIRACLError with an exception describing issues with the operation.