Whether the user is logged in.
Returns a promise that resolves to the most recent AccountInfo (or null if not logged in). Does not resolve until at least one attempt to check account info has been made.
The JWT token for the current user, or null if not logged in.
Returns a promise that resolves to the most recent token (or null if not logged in). Does not resolve until at least one attempt to retrieve a JWT token has been made, or if we know that we are not logged in.
Like tokenPromise, but resolves to null if we have a token without the 'verified' role (i.e. can't do anything with it other than verifying account).
Change password
This will start the refresh loop, and also perform a refresh before resolving.
Perform a login
AccountInfo if login succeeded, null if login failed.
Log out.
Refresh the account state.
This will refresh the account state, and if the account is logged in, will also refresh the JWT token.
Refresh the JWT token.
Registers a new user with the provided email, password, and display name.
The email address of the user to be registered.
The password for the user account.
The display name of the user.
A promise that resolves to the registration response on success, or a validation error response if the request fails due to validation errors. Throws an error for other types of failures.
Requests that the verification code be resent to the user's email address.
Submits a verification code to verify the user's email address.
Current logged-in account info, or null if not logged in.