Class

UserClient

UserClient()

A class to manage user information.
Constructor

# new UserClient()

View Source lib/client/UserClient.ts, line 11

Extends

Members

HttpClient

# protected client

Inherited From:

View Source lib/client/Client.ts, line 20

Methods

# create(email) → {Promise.<User>}

Creates a new user. Afterwards, verify the email address via passcode. If a 'ConflictError' occurred, you may want to prompt the user to log in.
Parameters:
Name Type Description
email string The email address of the user to be created.
See:

View Source lib/client/UserClient.ts, line 155

Promise.<User>

# getInfo(email) → {Promise.<UserInfo>}

Fetches basic information about the user identified by the given email address. Can be used while the user is logged out and is helpful in deciding which type of login to choose. For example, if the user's email is not verified, you may want to log in with a passcode, or if no WebAuthn credentials are registered, you may not want to use WebAuthn.
Parameters:
Name Type Description
email string The user's email address.
See:

View Source lib/client/UserClient.ts, line 142

Promise.<UserInfo>