Skip to main content

Class: Flow

Types.Flow

This class is the main entry point for users of the SlashID SDK. It exposes a single function for uniform access to all supported identification methods as id. The returned BaseUser object has methods to either register further user handles (e.g. a second e-mail address, or a phone number), or ask the user to authenticate using any number of available authentication methods. Please see BaseUser for further details and examples.

For a quick start please consult the constructor and id documentation and examples.

Constructors

constructor

new Flow(slashID, emitter)

Parameters

NameType
slashIDSlashID
emitterEventEmitter<NamedEvents>

Properties

flowId

Readonly flowId: string

Methods

id

id(oid, handle, authenticationFactor): Promise<User>

Parameters

NameType
oidstring
handlePersonHandle
authenticationFactorFactor

Returns

Promise<User>


recover

recover(__namedParameters): Promise<void>

Use a verified handle and a factor to start the account recovery flow. The user will receive instructions on how to proceed using a delivery mechanism based on the given handle. After this method resolves, the user will be able to authenticate using the same handle and factor.

Parameters

NameType
__namedParametersObject
__namedParameters.factorRecoverableFactor
__namedParameters.handlePersonHandle

Returns

Promise<void>