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
| Name | Type |
|---|---|
slashID | SlashID |
emitter | EventEmitter<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
| Name | Type |
|---|---|
__namedParameters | Object |
__namedParameters.authenticationFactor? | Factor |
__namedParameters.handle? | PersonHandle |
__namedParameters.oid | string |
__namedParameters.prevToken? | string |
Returns
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
| Name | Type |
|---|---|
__namedParameters | Object |
__namedParameters.factor | RecoverableFactor |
__namedParameters.handle | PersonHandle |
Returns
Promise<void>