Function: login

Function: login()

login(authToken, keyTypes?): Promise< LoginResult >

Description

Log into the Fordefi client using the given auth token and generate keys if they were not generated yet.

The auth token is acquired using a call to the Issue Authorization Token REST API.

Throws

FordefiSdkErrorResult

Parameters

ParameterTypeDescription
authTokenstringThe auth token to use for login.
keyTypesKeyTypeOptional
An array of key types for keys generation. If you don't specify a value for this parameter, all key types are created.

Returns

Promise< LoginResult >

A Promise that resolves when the login operation is successful. LoginResult is an object that contains both UserId and DeviceState for the react native SDK. For native SDKs, that is (UserId, DeviceState)