GoTrueClient class
Methods
-
getSessionFromUrl(Uri originUrl, {bool storeSession = true})
→ Future<GotrueSessionResponse>
-
Gets the session data from a oauth2 callback URL
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
onAuthStateChange(Callback callback)
→ GotrueSubscription
-
-
recoverSession(String jsonStr)
→ Future<GotrueSessionResponse>
-
Recover session from persisted session json string.
Persisted session json has the format { currentSession, expiresAt }
-
refreshSession()
→ Future<GotrueSessionResponse>
-
Force refreshes the session including the user data in case it was updated in a different session.
-
session()
→ Session?
-
Returns the session data, if there is an active session.
-
setAuth(String accessToken)
→ Session
-
Overrides the JWT on the current client. The JWT will then be sent in all subsequent network requests.
-
setSession(String refreshToken)
→ Future<GotrueSessionResponse>
-
Sets the session data from refresh_token and returns current Session and Error
-
signIn({String? email, String? phone, String? password, Provider? provider, OpenIDConnectCredentials? oidc, AuthOptions? options})
→ Future<GotrueSessionResponse>
-
Log in an existing user, or login via a third-party provider.
-
signOut()
→ Future<GotrueResponse>
-
Signs out the current user, if there is a logged in user.
-
signUp(String email, String password, {AuthOptions? options, Map<String, dynamic>? userMetadata})
→ Future<GotrueSessionResponse>
-
Creates a new user.
-
signUpWithPhone(String phone, String password, {AuthOptions? options, Map<String, dynamic>? userMetadata})
→ Future<GotrueSessionResponse>
-
Signs up a new user using their phone number and a password.
-
toString()
→ String
-
A string representation of this object.
inherited
-
update(UserAttributes attributes)
→ Future<GotrueUserResponse>
-
Updates user data, if there is a logged in user.
-
user()
→ User?
-
Returns the user data, if there is a logged in user.
-
verifyOTP(String phone, String token, {AuthOptions? options})
→ Future<GotrueSessionResponse>
-
Log in a user given a User supplied OTP received via mobile.