Set to "true" if you want to automatically refresh the token before expiring.
Set to "true" if you want to automatically detects OAuth grants in the URL and signs in the user.
A custom fetch implementation.
Any additional headers to send to the GoTrue server.
Provide your own local storage implementation to use instead of the browser's local storage.
Set to "false" if you want to disable multi-tab/window events.
Set to "true" if you want to automatically save the user session into local storage.
The URL of the GoTrue server.
Listens for changes to LocalStorage and updates the current session.
Recovers the session from LocalStorage and refreshes Note: this method is async to accommodate for AsyncStorage e.g. in React native.
Attempts to get the session from LocalStorage Note: this should never be async (even for React Native), as we need it to return immediately in the constructor.
set currentSession and currentUser process to _startAutoRefreshToken if possible
Clear and re-create refresh token timer
Namespace for the GoTrue API methods. These can be used for example to get a user from a JWT in a server environment or reset a user's password.
The session object for the currently logged in user or null.
The currently logged in user or null.
Gets the session data from a URL string
Optionally store the session in the browser
Receive a notification every time an auth event happens.
A subscription object which can be used to unsubscribe itself.
Force refreshes the session including the user data in case it was updated in a different session.
Returns the session data, if there is an active session.
Overrides the JWT on the current client. The JWT will then be sent in all subsequent network requests.
a jwt access token
Sets the session data from refresh_token and returns current Session and Error
a JWT token
Log in an existing user, or login via a third-party provider.
Inside a browser context, signOut() will remove the logged in
user from the browser session and log them out - removing all items from
localstorage and then trigger a "SIGNED_OUT" event.
For server-side management, you can revoke all refresh tokens for a user by
passing a user's JWT through to
auth.api.signOut(JWT: string). There is no way to revoke a
user's session JWT before it automatically expires
Creates a new user.
Updates user data, if there is a logged in user.
Inside a browser context, user() will return the user data, if
there is a logged in user.
For server-side management, you can get a user through
auth.api.getUserByCookie()
Log in a user given a User supplied OTP received via mobile.
Generated using TypeDoc
Create a new client for use in the browser.