Class

PasscodeClient

PasscodeClient()

A class to handle passcodes.
Constructor

# new PasscodeClient()

View Source lib/client/PasscodeClient.ts, line 13

Extends

Methods

# async finalize(userID, code) → {Promise.<void>}

Validates the passcode obtained from the email.
Parameters:
Name Type Description
userID string The UUID of the user.
code string The passcode digests.
See:

View Source lib/client/PasscodeClient.ts, line 163

Promise.<void>

# getResendAfter(userID) → {number}

Returns the number of seconds the rate limiting is active for.
Parameters:
Name Type Description
userID string The UUID of the user.

View Source lib/client/PasscodeClient.ts, line 179

number

# getTTL(userID) → {number}

Returns the number of seconds the current passcode is active for.
Parameters:
Name Type Description
userID string The UUID of the user.

View Source lib/client/PasscodeClient.ts, line 171

number

# async initialize(userID, emailIDopt, forceopt) → {Promise.<Passcode>}

Causes the API to send a new passcode to the user's email address.
Parameters:
Name Type Attributes Description
userID string The UUID of the user.
emailID string <optional>
The UUID of the email address. If unspecified, the email will be sent to the primary email address.
force boolean <optional>
Indicates the passcode should be sent, even if there is another active passcode.
See:

View Source lib/client/PasscodeClient.ts, line 148

Promise.<Passcode>