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 138

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 154

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 146

number

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

Causes the API to send a new passcode to the user's email address.
Parameters:
Name Type Description
userID string The UUID of the user.
See:

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

Promise.<Passcode>