Skip to main content

Class: Flow

Types.Flow

Use to put all the events from a single authentication in the same context.

Constructors

constructor

new Flow(slashID, emitter)

Parameters

NameType
slashIDSlashID
emitterEventEmitter<NamedEvents>

Properties

flowId

Readonly flowId: string

Methods

_id

_id(__namedParameters): Promise<User>

Returns a User instance upon successful authentication. If authContextUpdateEnabled flag is raised, login flow will block and wait until the corresponding ACK event is submitted.

Parameters

NameType
__namedParametersObject
__namedParameters.authenticationFactor?Factor
__namedParameters.handle?PersonHandle
__namedParameters.oidstring
__namedParameters.prevToken?string

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>