Creates a new user.
This function should only be called on a server. Never expose your
service_role key in the browser.
The data you want to create the user with.
Deletes the Auth Cookies and redirects to the
The request object.
The response object.
Optionally specify a redirectTo URL in the options.
Generates links to be sent via email or other.
The link type ("signup" or "magiclink" or "recovery" or "invite").
The user's email.
Helper method to generate the Auth Cookie string for you in case you
can't use setAuthCookie.
The request object.
The response object.
The Cookie string that needs to be set as the value for the
Set-Cookie header.
Generates the relevant login URL for a third-party provider.
One of the providers supported by GoTrue.
Gets the current user details.
This method is called by the GoTrueClient update where the jwt
is set to this.currentSession.access_token and therefore, acts like getting
the currently authenticated user
A valid, logged-in JWT. Typically, the access_token for the currentSession
Generates a new JWT.
A valid refresh token that was returned on login.
Sends a reset request to an email address.
The email address of the user.
Sends a magic login link to an email address.
The email address of the user.
Sends a mobile OTP via SMS. Will register the account if it doesn't already exist
The user's phone number WITH international prefix
Set/delete the auth cookie based on the AuthChangeEvent. Works for Next.js & Express (requires cookie-parser middleware).
The request object.
The response object.
Logs in an existing user using their email address.
The email address of the user.
The password of the user.
Logs in an OpenID Connect user using their id_token.
Logs in an existing user using their phone number and password.
The phone number of the user.
The password of the user.
Removes a logged-in session.
A valid, logged-in JWT.
Creates a new user using their email address.
The email address of the user.
The password of the user.
A logged-in session if the server has "autoconfirm" ON
Signs up a new user using their phone number and a password.
The phone number of the user.
The password of the user.
Updates the user data.
A valid, logged-in JWT.
The data you want to update.
Updates the user data.
The data you want to update.
This function should only be called on a server. Never expose your
service_role key in the browser.
The user's phone number WITH international prefix
token that user was sent to their mobile phone
Send User supplied Email / Mobile OTP to be verified
Generated using TypeDoc
Create a temporary object with all configured headers and adds the Authorization token to be used on request methods
A valid, logged-in JWT.