ID of the MFA factor to delete.
ID of the user whose factor is being deleted.
ID of the user.
AuthOtpResponse is returned when OTP is used.
{@see AuthResponse}
The user's email
The user's new email. Only required if type is 'email_change_current' or 'email_change_new'.
The user's email
The properties related to the email link generated
The email link to send to the user. The action_link follows the following format: auth/v1/verify?type={verification_type}&token={hashed_token}&redirect_to={redirect_to}
The raw email OTP. You should send this in the email if you want your users to verify using an OTP instead of the action link.
The hashed token appended to the action link.
The URL appended to the action link.
The verification type that the email link is associated to.
The user's email
Set to "true" if there is a custom authorization header set globally.
Provide your own locking mechanism based on the environment. By default no locking is done at this time.
Provide your own global lock implementation instead of the default
implementation. The function should acquire a lock for the duration of the
fn
async function, such that no other client instances will be able to
hold it at the same time.
Name of the lock to be acquired.
If negative, no timeout should occur. If positive it
should throw an Error with an isAcquireTimeout
property set to true if the operation fails to be
acquired after this much time (ms).
The operation to execute when the lock is acquired.
Verification code provided by the user.
ID of the factor being verified. Returned in enroll().
Messaging channel to use (e.g. whatsapp or sms). Only relevant for phone factors
ID of the factor to be challenged. Returned in enroll().
ID of the factor being unenrolled.
ID of the challenge being verified. Returned in challenge().
Verification code provided by the user.
ID of the factor being verified. Returned in enroll().
The page number
Number of items returned per page
One of the providers supported by GoTrue.
Verification token received when the user completes the captcha on the site.
A custom data object to store the user's metadata. This maps to the auth.users.raw_user_meta_data
column.
The data
should be a JSON object that includes user-specific info, such as their first and last name.
If the ID token contains an at_hash
claim, then the hash of this value is compared to the value in the ID token.
If the ID token contains a nonce
claim, then the hash of this value is compared to the value in the ID token.
Verification token received when the user completes the captcha on the site.
Provider name or OIDC iss
value identifying which provider should be used to verify the provided token. Supported names: google
, apple
, azure
, facebook
, kakao
, keycloak
(deprecated).
OIDC ID token issued by the specified provider. The iss
claim in the ID token must match the supplied provider. Some ID tokens contain an at_hash
which require that you provide an access_token
value to be accepted properly. If the token contains a nonce
claim you must supply the nonce used to obtain the ID token.
An object of query params
A URL to send the user to after they are confirmed.
A space-separated list of scopes granted to the OAuth application.
If set to true does not immediately redirect the current browser context to visit the OAuth authorization page for the provider.
One of the providers supported by GoTrue.
Determines which sessions should be logged out. Global means all sessions by this account. Local means only this session. Others means all other sessions except the current one. When using others, there is no sign-out event fired on the current session!
Implements a global exclusive lock using the Navigator LockManager API. It is available on all browsers released after 2022-03-15 with Safari being the last one to release support. If the API is not available, this function will throw. Make sure you check availablility before configuring GoTrueClient.
You can turn on debugging by setting the supabase.gotrue-js.locks.debug
local storage item to true
.
Internals:
Since the LockManager API does not preserve stack traces for the async
function passed in the request
method, a trick is used where acquiring the
lock releases a previously started promise to run the operation in the fn
function. The lock waits for that promise to finish (with or without error),
while the function will finally wait for the result anyway.
Name of the lock to be acquired.
If negative, no timeout. If 0 an error is thrown if
the lock can't be acquired without waiting. If positive, the lock acquire
will time out after so many milliseconds. An error is
a timeout if it has isAcquireTimeout
set to true.
The operation to run once the lock is acquired.
Generated using TypeDoc