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
Name | Type |
---|---|
slashID | SlashID |
emitter | EventEmitter <NamedEvents > |
Properties
flowId
• Readonly
flowId: string
Methods
id
▸ id(oid
, handle
, authenticationFactor
): Promise
<User
>
Parameters
Name | Type |
---|---|
oid | string |
handle | PersonHandle |
authenticationFactor | Factor |
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
>