From 96c5831a2e91742db8c33fbe109c4f89b626dbe0 Mon Sep 17 00:00:00 2001 From: acupofjose <9093699+acupofjose@users.noreply.github.com> Date: Fri, 5 Apr 2024 03:20:40 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20supabase?= =?UTF-8?q?-community/gotrue-csharp@3ffc0ba5fcc2fcb330e826bce41901246e6f3d?= =?UTF-8?q?4e=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/Supabase.Gotrue.Api.html | 72 +++++++++-------- api/Supabase.Gotrue.Client.html | 79 ++++++++++--------- ...pabase.Gotrue.Interfaces.IGotrueApi-2.html | 8 +- ...ase.Gotrue.Interfaces.IGotrueClient-2.html | 59 +++++++------- index.json | 8 +- xrefmap.yml | 72 ++++++++--------- 6 files changed, 156 insertions(+), 142 deletions(-) diff --git a/api/Supabase.Gotrue.Api.html b/api/Supabase.Gotrue.Api.html index 919d605..d965979 100644 --- a/api/Supabase.Gotrue.Api.html +++ b/api/Supabase.Gotrue.Api.html @@ -271,7 +271,7 @@

Methods

CreateUser(string, AdminUserAttributes?) - +

Create a user

@@ -312,7 +312,7 @@

Returns

DeleteUser(string, string) - +

Delete a user

@@ -353,7 +353,7 @@

Returns

ExchangeCodeForSession(string, string) - +

Log in an existing user via code from third-party provider.

@@ -394,7 +394,7 @@

Returns

Generates email links and OTPs to be sent via a custom email provider.

@@ -433,7 +433,7 @@

Returns

GetUriForProvider(Provider, SignInOptions?) - +

@@ -471,7 +471,7 @@

Returns

GetUser(string) - +

Gets User Details

@@ -508,7 +508,7 @@

Returns

GetUserById(string, string) - +

Get User details by Id

@@ -549,7 +549,7 @@

Returns

InviteUserByEmail(string, string, InviteUserByEmailOptions?) - +

Sends an invite link to an email address.

@@ -591,7 +591,7 @@

Returns

LinkIdentity(string, Provider, SignInOptions) - +

Links an oauth identity to an existing user.

@@ -635,7 +635,7 @@

Returns

ListUsers(string, string?, string?, SortOrder, int?, int?) - +

Lists users

@@ -688,7 +688,7 @@

Returns

Reauthenticate(string) - +

Sends a re-authentication request, used for password changes.

@@ -727,7 +727,7 @@

Returns

RefreshAccessToken(string, string) - +

Generates a new Session given a user's access token and refresh token.

@@ -766,7 +766,7 @@

Returns

ResetPasswordForEmail(ResetPasswordForEmailOptions) - +

Sends a password reset request to an email address.

@@ -804,7 +804,7 @@

Returns

ResetPasswordForEmail(string) - +

Sends a reset request to an email address.

@@ -841,7 +841,7 @@

Returns

SendMagicLinkEmail(string, SignInOptions?) - +

Sends a magic login link to an email address.

@@ -880,7 +880,7 @@

Returns

SendMobileOTP(string) - +

Sends a mobile OTP via SMS. Will register the account if it doesn't already exist

@@ -918,7 +918,7 @@

Returns

Settings() - +

Calls the GoTrue server to get the settings (for example, if email auto confirmation is turned on)

@@ -1026,9 +1026,9 @@

Returns

-

- SignInWithIdToken(Provider, string, string?, string?) - +

+ SignInWithIdToken(Provider, string, string?, string?, string?) +

Allows signing in with an ID token issued by certain supported providers. @@ -1038,20 +1038,26 @@

-
public Task<Session?> SignInWithIdToken(Constants.Provider provider, string idToken, string? nonce = null, string? captchaToken = null)
+
public Task<Session?> SignInWithIdToken(Constants.Provider provider, string idToken, string? accessToken = null, string? nonce = null, string? captchaToken = null)

Parameters

provider Constants.Provider
-

A supported provider (Google, Apple)

+

A supported provider (Google, Apple, Azure, Facebook)

idToken string
-
+

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.

+
+
accessToken string
+

If the ID token contains an at_hash claim, then the hash of this value is compared to the value in the ID token.

+
nonce string
-
+

If the ID token contains a nonce claim, then the hash of this value is compared to the value in the ID token.

+
captchaToken string
-
+

Verification token received when the user completes the captcha on the site.

+

Returns

@@ -1166,7 +1172,7 @@

Returns

SignInWithPhone(string, string) - +

Logs in an existing user using their phone number and password.

@@ -1207,7 +1213,7 @@

Returns

SignOut(string) - +

Removes a logged-in session.

@@ -1286,7 +1292,7 @@

Returns

SignUpWithPhone(string, string, SignUpOptions?) - +

Signs up a new user using their phone number and a password.The phone number of the user.

@@ -1330,7 +1336,7 @@

Returns

UnlinkIdentity(string, UserIdentity) - +

Unlinks an identity from a user by deleting it. The user will no longer be able to sign in with that identity once it's unlinked.

@@ -1371,7 +1377,7 @@

Returns

UpdateUser(string, UserAttributes) - +

Updates the User data

@@ -1410,7 +1416,7 @@

Returns

UpdateUserById(string, string, UserAttributes) - +

Update user by Id

@@ -1454,7 +1460,7 @@

Returns

VerifyEmailOTP(string, string, EmailOtpType) - +

Send User supplied Email OTP to be verified

@@ -1498,7 +1504,7 @@

Returns

VerifyMobileOTP(string, string, MobileOtpType) - +

Send User supplied Mobile OTP to be verified

diff --git a/api/Supabase.Gotrue.Client.html b/api/Supabase.Gotrue.Client.html index 7a0c8bf..4540579 100644 --- a/api/Supabase.Gotrue.Client.html +++ b/api/Supabase.Gotrue.Client.html @@ -287,7 +287,7 @@

Property Value

GetHeaders - +

Headers sent to the API on every request.

@@ -422,7 +422,7 @@

Methods

AddDebugListener(Action<string, Exception?>) - +

Add a listener to get errors that occur outside of a typical Exception flow. @@ -520,7 +520,7 @@

Debug(string, Exception?) - +

Posts messages and exceptions to the debug listener. This is particularly useful for sorting @@ -555,7 +555,7 @@

Parameters

ExchangeCodeForSession(string, string) - +

Logs in an existing user via a third-party provider.

@@ -594,7 +594,7 @@

Returns

GetSessionFromUrl(Uri, bool) - +

Parses a Session out of a Uri's Query parameters.

@@ -671,7 +671,7 @@

Returns

LinkIdentity(Provider, SignInOptions) - +

Links an oauth identity to an existing user.

@@ -712,7 +712,7 @@

Returns

LoadSession() - +

Loads the session from the persistence layer.

@@ -772,7 +772,7 @@

Parameters

Reauthenticate() - +

Used for re-authenticating a user in password changes.

@@ -810,7 +810,7 @@

Exceptions

RefreshSession() - +

Refreshes the currently logged in User's Session.

@@ -842,7 +842,7 @@

Returns

RefreshToken() - +

Refreshes a Token using the current session.

@@ -874,7 +874,7 @@

Returns

RefreshToken(string, string) - +

@@ -944,7 +944,7 @@

Parameters

ResetPasswordForEmail(ResetPasswordForEmailOptions) - +

Sends a password reset request to an email address.

@@ -982,7 +982,7 @@

Returns

ResetPasswordForEmail(string) - +

Sends a reset request to an email address.

@@ -1019,7 +1019,7 @@

Returns

RetrieveSessionAsync() - +

Typically called as part of the startup process for the client.

@@ -1054,7 +1054,7 @@

Returns

Sends a Magic email login link to the specified email.

@@ -1127,7 +1127,7 @@

Parameters

SetSession(string, string, bool) - +

Sets a new session given a user's access token and their refresh token.

@@ -1182,7 +1182,7 @@

Exceptions

Settings() - +

Retrieves the settings from the server

@@ -1214,7 +1214,7 @@

Returns

Shutdown() - +

Let all of the listeners know that the stateless client is being shutdown.

@@ -1242,7 +1242,7 @@

SignIn(Provider, SignInOptions?) - +

Retrieves a ProviderAuthState to redirect to for signing in with a Constants.Provider.

@@ -1283,7 +1283,7 @@

Returns

SignIn(SignInType, string, string?, string?) - +

Log in an existing user, or login via a third-party provider.

@@ -1369,7 +1369,7 @@

Returns

SignIn(string, string) - +

Signs in a User.

@@ -1408,7 +1408,7 @@

Returns

SignInAnonymously(SignInAnonymouslyOptions?) - +

Creates a new anonymous user.

@@ -1444,8 +1444,8 @@

Returns

-

- SignInWithIdToken(Provider, string, string?, string?) +

+ SignInWithIdToken(Provider, string, string?, string?, string?)

@@ -1456,22 +1456,25 @@

-
public Task<Session?> SignInWithIdToken(Constants.Provider provider, string idToken, string? nonce = null, string? captchaToken = null)
+
public Task<Session?> SignInWithIdToken(Constants.Provider provider, string idToken, string? accessToken = null, string? nonce = null, string? captchaToken = null)

Parameters

provider Constants.Provider
-

A supported provider (Google, Apple)

+

Provider name or OIDC iss value identifying which provider should be used to verify the provided token. Supported names: google, apple, azure, facebook

idToken string
-

Provided from External Library

+

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.

+
+
accessToken string
+

If the ID token contains an at_hash claim, then the hash of this value is compared to the value in the ID token.

nonce string
-

Provided from External Library

+

If the ID token contains a nonce claim, then the hash of this value is compared to the value in the ID token.

captchaToken string
-

Provided from External Library

+

Verification token received when the user completes the captcha on the site.

@@ -1487,7 +1490,7 @@

Returns

-

Remarks

+

Remarks

Calling this method will eliminate the current session (if any).

@@ -1498,7 +1501,7 @@

SignInWithOtp(SignInWithPasswordlessEmailOptions) - +

Log in a user using magiclink or a one-time password (OTP).

@@ -1547,7 +1550,7 @@

SignInWithOtp(SignInWithPasswordlessPhoneOptions) - +

Log in a user using magiclink or a one-time password (OTP).

@@ -1596,7 +1599,7 @@

SignInWithPassword(string, string) - +

Log in an existing user with an email and password or phone and password.

@@ -1635,7 +1638,7 @@

Returns

SignOut() - +

Signs out a user and invalidates the current token.

@@ -1777,7 +1780,7 @@

UnlinkIdentity(UserIdentity) - +

Unlinks an identity from a user by deleting it. The user will no longer be able to sign in with that identity once it's unlinked.

@@ -1815,7 +1818,7 @@

Returns

Update(UserAttributes) - +

Updates a User.

@@ -1852,7 +1855,7 @@

Returns

VerifyOTP(string, string, EmailOtpType) - +

Log in a user give a user supplied OTP received via email.

@@ -1894,7 +1897,7 @@

Returns

VerifyOTP(string, string, MobileOtpType) - +

Log in a user given a User supplied OTP received via mobile.

diff --git a/api/Supabase.Gotrue.Interfaces.IGotrueApi-2.html b/api/Supabase.Gotrue.Interfaces.IGotrueApi-2.html index 770b010..8c3e785 100644 --- a/api/Supabase.Gotrue.Interfaces.IGotrueApi-2.html +++ b/api/Supabase.Gotrue.Interfaces.IGotrueApi-2.html @@ -855,8 +855,8 @@

Returns

-

- SignInWithIdToken(Provider, string, string?, string?) +

+ SignInWithIdToken(Provider, string, string?, string?, string?)

@@ -864,7 +864,7 @@

-
Task<TSession?> SignInWithIdToken(Constants.Provider provider, string idToken, string? nonce = null, string? captchaToken = null)
+
Task<TSession?> SignInWithIdToken(Constants.Provider provider, string idToken, string? accessToken = null, string? nonce = null, string? captchaToken = null)

Parameters

@@ -873,6 +873,8 @@

Parameters

idToken string
+
accessToken string
+
nonce string
captchaToken string
diff --git a/api/Supabase.Gotrue.Interfaces.IGotrueClient-2.html b/api/Supabase.Gotrue.Interfaces.IGotrueClient-2.html index 7f02b17..03f6544 100644 --- a/api/Supabase.Gotrue.Interfaces.IGotrueClient-2.html +++ b/api/Supabase.Gotrue.Interfaces.IGotrueClient-2.html @@ -251,7 +251,7 @@

Property Value

Options - +

Returns the client options.

@@ -287,7 +287,7 @@

Methods

AddDebugListener(Action<string, Exception?>) - +

Add a listener to get errors that occur outside of a typical Exception flow. @@ -385,7 +385,7 @@

Debug(string, Exception?) - +

Posts messages and exceptions to the debug listener. This is particularly useful for sorting @@ -420,7 +420,7 @@

Parameters

ExchangeCodeForSession(string, string) - +

Logs in an existing user via a third-party provider.

@@ -498,7 +498,7 @@

Returns

GetUser(string) - +

Get User details by JWT. Can be used to validate a JWT.

@@ -536,7 +536,7 @@

Returns

LinkIdentity(Provider, SignInOptions) - +

Links an oauth identity to an existing user.

@@ -577,7 +577,7 @@

Returns

LoadSession() - +

Loads the session from the persistence layer.

@@ -637,7 +637,7 @@

Parameters

Reauthenticate() - +

Used for re-authenticating a user in password changes.

@@ -707,7 +707,7 @@

Returns

RefreshToken() - +

Refreshes a Token using the current session.

@@ -1009,7 +1009,7 @@

Exceptions

Settings() - +

Retrieves the settings from the server

@@ -1041,7 +1041,7 @@

Returns

Shutdown() - +

Let all of the listeners know that the stateless client is being shutdown.

@@ -1235,7 +1235,7 @@

Returns

SignInAnonymously(SignInAnonymouslyOptions?) - +

Creates a new anonymous user.

@@ -1271,9 +1271,9 @@

Returns

-

- SignInWithIdToken(Provider, string, string?, string?) - +

+ SignInWithIdToken(Provider, string, string?, string?, string?) +

Allows signing in with an ID token issued by certain supported providers. @@ -1283,22 +1283,25 @@

-
Task<TSession?> SignInWithIdToken(Constants.Provider provider, string idToken, string? nonce = null, string? captchaToken = null)
+
Task<TSession?> SignInWithIdToken(Constants.Provider provider, string idToken, string? accessToken = null, string? nonce = null, string? captchaToken = null)

Parameters

provider Constants.Provider
-

A supported provider (Google, Apple)

+

Provider name or OIDC iss value identifying which provider should be used to verify the provided token. Supported names: google, apple, azure, facebook

idToken string
-

Provided from External Library

+

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.

+
+
accessToken string
+

If the ID token contains an at_hash claim, then the hash of this value is compared to the value in the ID token.

nonce string
-

Provided from External Library

+

If the ID token contains a nonce claim, then the hash of this value is compared to the value in the ID token.

captchaToken string
-

Provided from External Library

+

Verification token received when the user completes the captcha on the site.

@@ -1314,7 +1317,7 @@

Returns

-

Remarks

+

Remarks

Calling this method will eliminate the current session (if any).

@@ -1462,7 +1465,7 @@

Returns

SignOut() - +

Signs out a user and invalidates the current token.

@@ -1494,7 +1497,7 @@

Returns

SignUp(SignUpType, string, string, SignUpOptions?) - +

Signs up a user

@@ -1550,7 +1553,7 @@

SignUp(string, string, SignUpOptions?) - +

Signs up a user by email address.

@@ -1606,7 +1609,7 @@

UnlinkIdentity(UserIdentity) - +

Unlinks an identity from a user by deleting it. The user will no longer be able to sign in with that identity once it's unlinked.

@@ -1644,7 +1647,7 @@

Returns

Update(UserAttributes) - +

Updates a User.

@@ -1681,7 +1684,7 @@

Returns

VerifyOTP(string, string, EmailOtpType) - +

Log in a user give a user supplied OTP received via email.

@@ -1723,7 +1726,7 @@

Returns

VerifyOTP(string, string, MobileOtpType) - +

Log in a user given a User supplied OTP received via mobile.

diff --git a/index.json b/index.json index 86887dd..7d12d2b 100644 --- a/index.json +++ b/index.json @@ -12,12 +12,12 @@ "api/Supabase.Gotrue.Api.html": { "href": "api/Supabase.Gotrue.Api.html", "title": "Class Api | gotrue-csharp", - "keywords": "Class Api Namespace Supabase.Gotrue Assembly Supabase.Gotrue.dll The REST calls to the Gotrue API. public class Api : IGotrueApi, IGettableHeaders Inheritance object Api Implements IGotrueApi IGettableHeaders Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString() Constructors Api(string, Dictionary?) Creates a new API client public Api(string url, Dictionary? headers = null) Parameters url string headers Dictionary Properties GetHeaders Function that can be set to return dynamic headers. Headers specified in the constructor will ALWAYS take precedence over headers returned by this function. public Func>? GetHeaders { get; set; } Property Value Func> Headers Headers to be sent with every request. These will be merged with any headers returned by GetHeaders. protected Dictionary Headers { get; set; } Property Value Dictionary Methods CreateUser(string, AdminUserAttributes?) Create a user public Task CreateUser(string jwt, AdminUserAttributes? attributes = null) Parameters jwt string A valid JWT. Must be a full-access API key (e.g. service_role key). attributes AdminUserAttributes Additional administrative details Returns Task DeleteUser(string, string) Delete a user public Task DeleteUser(string uid, string jwt) Parameters uid string The user uid you want to remove. jwt string A valid JWT. Must be a full-access API key (e.g. service_role key). Returns Task ExchangeCodeForSession(string, string) Log in an existing user via code from third-party provider. public Task ExchangeCodeForSession(string codeVerifier, string authCode) Parameters codeVerifier string Generated verifier (probably from GetUrlForProvider) authCode string The received Auth Code Callback Returns Task GenerateLink(string, GenerateLinkOptions) Generates email links and OTPs to be sent via a custom email provider. public Task GenerateLink(string jwt, GenerateLinkOptions options) Parameters jwt string options GenerateLinkOptions Returns Task GetUriForProvider(Provider, SignInOptions?) public ProviderAuthState GetUriForProvider(Constants.Provider provider, SignInOptions? options = null) Parameters provider Constants.Provider options SignInOptions Returns ProviderAuthState GetUser(string) Gets User Details public Task GetUser(string jwt) Parameters jwt string Returns Task GetUserById(string, string) Get User details by Id public Task GetUserById(string jwt, string userId) Parameters jwt string A valid JWT. Must be a full-access API key (e.g. service_role key). userId string userID Returns Task InviteUserByEmail(string, string, InviteUserByEmailOptions?) Sends an invite link to an email address. public Task InviteUserByEmail(string email, string jwt, InviteUserByEmailOptions? options = null) Parameters email string jwt string this token needs role 'supabase_admin' or 'service_role' options InviteUserByEmailOptions Returns Task LinkIdentity(string, Provider, SignInOptions) Links an oauth identity to an existing user. This method requires the PKCE flow. public Task LinkIdentity(string token, Constants.Provider provider, SignInOptions options) Parameters token string User's token provider Constants.Provider Provider to Link options SignInOptions Returns Task ListUsers(string, string?, string?, SortOrder, int?, int?) Lists users public Task?> ListUsers(string jwt, string? filter = null, string? sortBy = null, Constants.SortOrder sortOrder = SortOrder.Descending, int? page = null, int? perPage = null) Parameters jwt string A valid JWT. Must be a full-access API key (e.g. service_role key). filter string A string for example part of the email sortBy string Snake case string of the given key, currently only created_at is supported sortOrder Constants.SortOrder asc or desc, if null desc is used page int? page to show for pagination perPage int? items per page for pagination Returns Task> Reauthenticate(string) Sends a re-authentication request, used for password changes. See: https://github.com/supabase/gotrue#get-reauthenticate public Task Reauthenticate(string userJwt) Parameters userJwt string The user's auth token. Returns Task RefreshAccessToken(string, string) Generates a new Session given a user's access token and refresh token. public Task RefreshAccessToken(string accessToken, string refreshToken) Parameters accessToken string refreshToken string Returns Task ResetPasswordForEmail(ResetPasswordForEmailOptions) Sends a password reset request to an email address. This Method supports the PKCE Flow public Task ResetPasswordForEmail(ResetPasswordForEmailOptions options) Parameters options ResetPasswordForEmailOptions Returns Task ResetPasswordForEmail(string) Sends a reset request to an email address. public Task ResetPasswordForEmail(string email) Parameters email string Returns Task SendMagicLinkEmail(string, SignInOptions?) Sends a magic login link to an email address. public Task SendMagicLinkEmail(string email, SignInOptions? options = null) Parameters email string options SignInOptions Returns Task SendMobileOTP(string) Sends a mobile OTP via SMS. Will register the account if it doesn't already exist public Task SendMobileOTP(string phone) Parameters phone string phone The user's phone number WITH international prefix Returns Task Settings() Calls the GoTrue server to get the settings (for example, if email auto confirmation is turned on) public Task Settings() Returns Task mpose up -d SignInAnonymously(SignInAnonymouslyOptions?) Creates a new anonymous user. public Task SignInAnonymously(SignInAnonymouslyOptions? options = null) Parameters options SignInAnonymouslyOptions Returns Task A session where the is_anonymous claim in the access token JWT set to true SignInWithEmail(string, string) Logs in an existing user using their email address. public Task SignInWithEmail(string email, string password) Parameters email string password string Returns Task SignInWithIdToken(Provider, string, string?, string?) Allows signing in with an ID token issued by certain supported providers. The [idToken] is verified for validity and a new session is established. This method of signing in only supports [Provider.Google] or [Provider.Apple]. public Task SignInWithIdToken(Constants.Provider provider, string idToken, string? nonce = null, string? captchaToken = null) Parameters provider Constants.Provider A supported provider (Google, Apple) idToken string nonce string captchaToken string Returns Task SignInWithOtp(SignInWithPasswordlessEmailOptions) Log in a user using magiclink or a one-time password (OTP). If the {{ .ConfirmationURL }} variable is specified in the email template, a magiclink will be sent. If the {{ .Token }} variable is specified in the email template, an OTP will be sent. If you're using phone sign-ins, only an OTP will be sent. You won't be able to send a magiclink for phone sign-ins. Be aware that you may get back an error message that will not distinguish between the cases where the account does not exist or, that the account can only be accessed via social login. Do note that you will need to configure a Whatsapp sender on Twilio if you are using phone sign in with the 'whatsapp' channel. The whatsapp channel is not supported on other providers at this time. public Task SignInWithOtp(SignInWithPasswordlessEmailOptions options) Parameters options SignInWithPasswordlessEmailOptions Returns Task SignInWithOtp(SignInWithPasswordlessPhoneOptions) Log in a user using magiclink or a one-time password (OTP). If the {{ .ConfirmationURL }} variable is specified in the email template, a magiclink will be sent. If the {{ .Token }} variable is specified in the email template, an OTP will be sent. If you're using phone sign-ins, only an OTP will be sent. You won't be able to send a magiclink for phone sign-ins. Be aware that you may get back an error message that will not distinguish between the cases where the account does not exist or, that the account can only be accessed via social login. Do note that you will need to configure a Whatsapp sender on Twilio if you are using phone sign in with the 'whatsapp' channel. The whatsapp channel is not supported on other providers at this time. public Task SignInWithOtp(SignInWithPasswordlessPhoneOptions options) Parameters options SignInWithPasswordlessPhoneOptions Returns Task SignInWithPhone(string, string) Logs in an existing user using their phone number and password. public Task SignInWithPhone(string phone, string password) Parameters phone string The phone number of the user. password string The password of the user. Returns Task SignOut(string) Removes a logged-in session. public Task SignOut(string jwt) Parameters jwt string Returns Task SignUpWithEmail(string, string, SignUpOptions?) Signs a user up using an email address and password. public Task SignUpWithEmail(string email, string password, SignUpOptions? options = null) Parameters email string password string options SignUpOptions Optional Signup data. Returns Task SignUpWithPhone(string, string, SignUpOptions?) Signs up a new user using their phone number and a password.The phone number of the user. public Task SignUpWithPhone(string phone, string password, SignUpOptions? options = null) Parameters phone string The phone number of the user. password string The password of the user. options SignUpOptions Optional Signup data. Returns Task UnlinkIdentity(string, UserIdentity) Unlinks an identity from a user by deleting it. The user will no longer be able to sign in with that identity once it's unlinked. public Task UnlinkIdentity(string token, UserIdentity userIdentity) Parameters token string User's token userIdentity UserIdentity Identity to be unlinked Returns Task UpdateUser(string, UserAttributes) Updates the User data public Task UpdateUser(string jwt, UserAttributes attributes) Parameters jwt string attributes UserAttributes Returns Task UpdateUserById(string, string, UserAttributes) Update user by Id public Task UpdateUserById(string jwt, string userId, UserAttributes userData) Parameters jwt string A valid JWT. Must be a full-access API key (e.g. service_role key). userId string userID userData UserAttributes User attributes e.g. email, password, etc. Returns Task VerifyEmailOTP(string, string, EmailOtpType) Send User supplied Email OTP to be verified public Task VerifyEmailOTP(string email, string token, Constants.EmailOtpType type) Parameters email string The user's email address token string token that user was sent to their mobile phone type Constants.EmailOtpType Type of verification, e.g. invite, recovery, etc. Returns Task VerifyMobileOTP(string, string, MobileOtpType) Send User supplied Mobile OTP to be verified public Task VerifyMobileOTP(string phone, string token, Constants.MobileOtpType type) Parameters phone string The user's phone number WITH international prefix token string token that user was sent to their mobile phone type Constants.MobileOtpType e.g. SMS or phone change Returns Task" + "keywords": "Class Api Namespace Supabase.Gotrue Assembly Supabase.Gotrue.dll The REST calls to the Gotrue API. public class Api : IGotrueApi, IGettableHeaders Inheritance object Api Implements IGotrueApi IGettableHeaders Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString() Constructors Api(string, Dictionary?) Creates a new API client public Api(string url, Dictionary? headers = null) Parameters url string headers Dictionary Properties GetHeaders Function that can be set to return dynamic headers. Headers specified in the constructor will ALWAYS take precedence over headers returned by this function. public Func>? GetHeaders { get; set; } Property Value Func> Headers Headers to be sent with every request. These will be merged with any headers returned by GetHeaders. protected Dictionary Headers { get; set; } Property Value Dictionary Methods CreateUser(string, AdminUserAttributes?) Create a user public Task CreateUser(string jwt, AdminUserAttributes? attributes = null) Parameters jwt string A valid JWT. Must be a full-access API key (e.g. service_role key). attributes AdminUserAttributes Additional administrative details Returns Task DeleteUser(string, string) Delete a user public Task DeleteUser(string uid, string jwt) Parameters uid string The user uid you want to remove. jwt string A valid JWT. Must be a full-access API key (e.g. service_role key). Returns Task ExchangeCodeForSession(string, string) Log in an existing user via code from third-party provider. public Task ExchangeCodeForSession(string codeVerifier, string authCode) Parameters codeVerifier string Generated verifier (probably from GetUrlForProvider) authCode string The received Auth Code Callback Returns Task GenerateLink(string, GenerateLinkOptions) Generates email links and OTPs to be sent via a custom email provider. public Task GenerateLink(string jwt, GenerateLinkOptions options) Parameters jwt string options GenerateLinkOptions Returns Task GetUriForProvider(Provider, SignInOptions?) public ProviderAuthState GetUriForProvider(Constants.Provider provider, SignInOptions? options = null) Parameters provider Constants.Provider options SignInOptions Returns ProviderAuthState GetUser(string) Gets User Details public Task GetUser(string jwt) Parameters jwt string Returns Task GetUserById(string, string) Get User details by Id public Task GetUserById(string jwt, string userId) Parameters jwt string A valid JWT. Must be a full-access API key (e.g. service_role key). userId string userID Returns Task InviteUserByEmail(string, string, InviteUserByEmailOptions?) Sends an invite link to an email address. public Task InviteUserByEmail(string email, string jwt, InviteUserByEmailOptions? options = null) Parameters email string jwt string this token needs role 'supabase_admin' or 'service_role' options InviteUserByEmailOptions Returns Task LinkIdentity(string, Provider, SignInOptions) Links an oauth identity to an existing user. This method requires the PKCE flow. public Task LinkIdentity(string token, Constants.Provider provider, SignInOptions options) Parameters token string User's token provider Constants.Provider Provider to Link options SignInOptions Returns Task ListUsers(string, string?, string?, SortOrder, int?, int?) Lists users public Task?> ListUsers(string jwt, string? filter = null, string? sortBy = null, Constants.SortOrder sortOrder = SortOrder.Descending, int? page = null, int? perPage = null) Parameters jwt string A valid JWT. Must be a full-access API key (e.g. service_role key). filter string A string for example part of the email sortBy string Snake case string of the given key, currently only created_at is supported sortOrder Constants.SortOrder asc or desc, if null desc is used page int? page to show for pagination perPage int? items per page for pagination Returns Task> Reauthenticate(string) Sends a re-authentication request, used for password changes. See: https://github.com/supabase/gotrue#get-reauthenticate public Task Reauthenticate(string userJwt) Parameters userJwt string The user's auth token. Returns Task RefreshAccessToken(string, string) Generates a new Session given a user's access token and refresh token. public Task RefreshAccessToken(string accessToken, string refreshToken) Parameters accessToken string refreshToken string Returns Task ResetPasswordForEmail(ResetPasswordForEmailOptions) Sends a password reset request to an email address. This Method supports the PKCE Flow public Task ResetPasswordForEmail(ResetPasswordForEmailOptions options) Parameters options ResetPasswordForEmailOptions Returns Task ResetPasswordForEmail(string) Sends a reset request to an email address. public Task ResetPasswordForEmail(string email) Parameters email string Returns Task SendMagicLinkEmail(string, SignInOptions?) Sends a magic login link to an email address. public Task SendMagicLinkEmail(string email, SignInOptions? options = null) Parameters email string options SignInOptions Returns Task SendMobileOTP(string) Sends a mobile OTP via SMS. Will register the account if it doesn't already exist public Task SendMobileOTP(string phone) Parameters phone string phone The user's phone number WITH international prefix Returns Task Settings() Calls the GoTrue server to get the settings (for example, if email auto confirmation is turned on) public Task Settings() Returns Task mpose up -d SignInAnonymously(SignInAnonymouslyOptions?) Creates a new anonymous user. public Task SignInAnonymously(SignInAnonymouslyOptions? options = null) Parameters options SignInAnonymouslyOptions Returns Task A session where the is_anonymous claim in the access token JWT set to true SignInWithEmail(string, string) Logs in an existing user using their email address. public Task SignInWithEmail(string email, string password) Parameters email string password string Returns Task SignInWithIdToken(Provider, string, string?, string?, string?) Allows signing in with an ID token issued by certain supported providers. The [idToken] is verified for validity and a new session is established. This method of signing in only supports [Provider.Google] or [Provider.Apple]. public Task SignInWithIdToken(Constants.Provider provider, string idToken, string? accessToken = null, string? nonce = null, string? captchaToken = null) Parameters provider Constants.Provider A supported provider (Google, Apple, Azure, Facebook) idToken string 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. accessToken string If the ID token contains an at_hash claim, then the hash of this value is compared to the value in the ID token. nonce string If the ID token contains a nonce claim, then the hash of this value is compared to the value in the ID token. captchaToken string Verification token received when the user completes the captcha on the site. Returns Task SignInWithOtp(SignInWithPasswordlessEmailOptions) Log in a user using magiclink or a one-time password (OTP). If the {{ .ConfirmationURL }} variable is specified in the email template, a magiclink will be sent. If the {{ .Token }} variable is specified in the email template, an OTP will be sent. If you're using phone sign-ins, only an OTP will be sent. You won't be able to send a magiclink for phone sign-ins. Be aware that you may get back an error message that will not distinguish between the cases where the account does not exist or, that the account can only be accessed via social login. Do note that you will need to configure a Whatsapp sender on Twilio if you are using phone sign in with the 'whatsapp' channel. The whatsapp channel is not supported on other providers at this time. public Task SignInWithOtp(SignInWithPasswordlessEmailOptions options) Parameters options SignInWithPasswordlessEmailOptions Returns Task SignInWithOtp(SignInWithPasswordlessPhoneOptions) Log in a user using magiclink or a one-time password (OTP). If the {{ .ConfirmationURL }} variable is specified in the email template, a magiclink will be sent. If the {{ .Token }} variable is specified in the email template, an OTP will be sent. If you're using phone sign-ins, only an OTP will be sent. You won't be able to send a magiclink for phone sign-ins. Be aware that you may get back an error message that will not distinguish between the cases where the account does not exist or, that the account can only be accessed via social login. Do note that you will need to configure a Whatsapp sender on Twilio if you are using phone sign in with the 'whatsapp' channel. The whatsapp channel is not supported on other providers at this time. public Task SignInWithOtp(SignInWithPasswordlessPhoneOptions options) Parameters options SignInWithPasswordlessPhoneOptions Returns Task SignInWithPhone(string, string) Logs in an existing user using their phone number and password. public Task SignInWithPhone(string phone, string password) Parameters phone string The phone number of the user. password string The password of the user. Returns Task SignOut(string) Removes a logged-in session. public Task SignOut(string jwt) Parameters jwt string Returns Task SignUpWithEmail(string, string, SignUpOptions?) Signs a user up using an email address and password. public Task SignUpWithEmail(string email, string password, SignUpOptions? options = null) Parameters email string password string options SignUpOptions Optional Signup data. Returns Task SignUpWithPhone(string, string, SignUpOptions?) Signs up a new user using their phone number and a password.The phone number of the user. public Task SignUpWithPhone(string phone, string password, SignUpOptions? options = null) Parameters phone string The phone number of the user. password string The password of the user. options SignUpOptions Optional Signup data. Returns Task UnlinkIdentity(string, UserIdentity) Unlinks an identity from a user by deleting it. The user will no longer be able to sign in with that identity once it's unlinked. public Task UnlinkIdentity(string token, UserIdentity userIdentity) Parameters token string User's token userIdentity UserIdentity Identity to be unlinked Returns Task UpdateUser(string, UserAttributes) Updates the User data public Task UpdateUser(string jwt, UserAttributes attributes) Parameters jwt string attributes UserAttributes Returns Task UpdateUserById(string, string, UserAttributes) Update user by Id public Task UpdateUserById(string jwt, string userId, UserAttributes userData) Parameters jwt string A valid JWT. Must be a full-access API key (e.g. service_role key). userId string userID userData UserAttributes User attributes e.g. email, password, etc. Returns Task VerifyEmailOTP(string, string, EmailOtpType) Send User supplied Email OTP to be verified public Task VerifyEmailOTP(string email, string token, Constants.EmailOtpType type) Parameters email string The user's email address token string token that user was sent to their mobile phone type Constants.EmailOtpType Type of verification, e.g. invite, recovery, etc. Returns Task VerifyMobileOTP(string, string, MobileOtpType) Send User supplied Mobile OTP to be verified public Task VerifyMobileOTP(string phone, string token, Constants.MobileOtpType type) Parameters phone string The user's phone number WITH international prefix token string token that user was sent to their mobile phone type Constants.MobileOtpType e.g. SMS or phone change Returns Task" }, "api/Supabase.Gotrue.Client.html": { "href": "api/Supabase.Gotrue.Client.html", "title": "Class Client | gotrue-csharp", - "keywords": "Class Client Namespace Supabase.Gotrue Assembly Supabase.Gotrue.dll public class Client : IGotrueClient, IGettableHeaders Inheritance object Client Implements IGotrueClient IGettableHeaders Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString() Constructors Client(ClientOptions?) Initializes the GoTrue stateful client. You will likely want to at least specify a ClientOptions.Url Sessions are not automatically retrieved when this object is created. If you want to load the session from your persistence store, GotrueSessionPersistence . If you want to load/refresh the session, RetrieveSessionAsync . For a typical client application, you'll want to load the session from persistence and then refresh it. If your application is listening for session changes, you'll get two SignIn notifications if the persisted session is valid - one for the session loaded from disk, and a second on a successful session refresh. var client = new Supabase.Gotrue.Client(options); client.LoadSession(); await client.RetrieveSessionAsync(); public Client(ClientOptions? options = null) Parameters options ClientOptions Properties CurrentSession The current Session as managed by this client. Does not refresh tokens or have any other side effects. You probably don't want to directly make changes to this object - you'll want to use other methods on this class to make changes. public Session? CurrentSession { get; } Property Value Session CurrentUser The currently logged in User. This is a local cache of the current session User. To persist modifications to the User you'll want to use other methods. Update(UserAttributes)> public User? CurrentUser { get; } Property Value User GetHeaders Headers sent to the API on every request. public Func>? GetHeaders { get; set; } Property Value Func> Online Indicates if the client should be considered online or offline. In a server environment, this client would likely always be online. On a mobile client, you will want to pair this with a network implementation to turn this on and off as the device goes online and offline. public bool Online { get; set; } Property Value bool Options Returns the client options. public ClientOptions Options { get; } Property Value ClientOptions TokenRefresh Get the TokenRefresh object, if it exists public TokenRefresh? TokenRefresh { get; } Property Value TokenRefresh Methods AddDebugListener(Action) Add a listener to get errors that occur outside of a typical Exception flow. In particular, this is used to get errors and messages from the background thread that automatically manages refreshing the user's token. public void AddDebugListener(Action listener) Parameters listener Action Callback method for debug messages AddStateChangedListener(AuthEventHandler) Adds a listener to be notified when the user state changes (e.g. the user logs in, logs out, the token is refreshed, etc). Constants.AuthState public void AddStateChangedListener(IGotrueClient.AuthEventHandler authEventHandler) Parameters authEventHandler IGotrueClient.AuthEventHandler ClearStateChangedListeners() Clears all of the listeners from receiving event state changes. WARNING: The persistence handler and refresh token thread are installed as state change listeners. Clearing the listeners will also delete these handlers. public void ClearStateChangedListeners() Debug(string, Exception?) Posts messages and exceptions to the debug listener. This is particularly useful for sorting out issues with the refresh token background thread. public void Debug(string message, Exception? e = null) Parameters message string e Exception ExchangeCodeForSession(string, string) Logs in an existing user via a third-party provider. public Task ExchangeCodeForSession(string codeVerifier, string authCode) Parameters codeVerifier string authCode string Returns Task GetSessionFromUrl(Uri, bool) Parses a Session out of a Uri's Query parameters. public Task GetSessionFromUrl(Uri uri, bool storeSession = true) Parameters uri Uri storeSession bool Returns Task GetUser(string) Get User details by JWT. Can be used to validate a JWT. public Task GetUser(string jwt) Parameters jwt string A valid JWT. Must be a JWT that originates from a user. Returns Task LinkIdentity(Provider, SignInOptions) Links an oauth identity to an existing user. This method requires the PKCE flow. public Task LinkIdentity(Constants.Provider provider, SignInOptions options) Parameters provider Constants.Provider Provider to Link options SignInOptions Returns Task LoadSession() Loads the session from the persistence layer. public void LoadSession() NotifyAuthStateChange(AuthState) Notifies all listeners that the current user auth state has changed. This is mainly used internally to fire notifications - most client applications won't need this. public void NotifyAuthStateChange(Constants.AuthState stateChanged) Parameters stateChanged Constants.AuthState Reauthenticate() Used for re-authenticating a user in password changes. See: https://github.com/supabase/gotrue#get-reauthenticate public Task Reauthenticate() Returns Task Exceptions GotrueException RefreshSession() Refreshes the currently logged in User's Session. public Task RefreshSession() Returns Task RefreshToken() Refreshes a Token using the current session. public Task RefreshToken() Returns Task RefreshToken(string, string) public Task RefreshToken(string accessToken, string refreshToken) Parameters accessToken string refreshToken string Returns Task RemoveStateChangedListener(AuthEventHandler) Removes a specified listener from event state changes. public void RemoveStateChangedListener(IGotrueClient.AuthEventHandler authEventHandler) Parameters authEventHandler IGotrueClient.AuthEventHandler ResetPasswordForEmail(ResetPasswordForEmailOptions) Sends a password reset request to an email address. Supports the PKCE Flow (the verifier from ResetPasswordForEmailState will be combined with ExchangeCodeForSession(string, string) in response) public Task ResetPasswordForEmail(ResetPasswordForEmailOptions options) Parameters options ResetPasswordForEmailOptions Returns Task ResetPasswordForEmail(string) Sends a reset request to an email address. public Task ResetPasswordForEmail(string email) Parameters email string Returns Task RetrieveSessionAsync() Typically called as part of the startup process for the client. This will take the currently loaded session (e.g. from a persistence implementation) and if possible attempt to refresh it. If the loaded session is expired or invalid, it will log the user out. public Task RetrieveSessionAsync() Returns Task SendMagicLink(string, SignInOptions?) Sends a Magic email login link to the specified email. Most of the interesting configuration for this flow is done in the Supabase/GoTrue admin panel. public Task SendMagicLink(string email, SignInOptions? options = null) Parameters email string options SignInOptions Returns Task SetPersistence(IGotrueSessionPersistence) Sets the persistence implementation for the client (e.g. file system, local storage, etc). public void SetPersistence(IGotrueSessionPersistence persistence) Parameters persistence IGotrueSessionPersistence SetSession(string, string, bool) Sets a new session given a user's access token and their refresh token. Will destroy the current session (if existing) Raise a SignedOut event. Decode token 3a. If expired (or bool forceAccessTokenRefresh set), force an access token refresh. 3b. If not expired, set the CurrentSession and retrieve CurrentUser from the server using the accessToken. Raise a `SignedIn event if successful. public Task SetSession(string accessToken, string refreshToken, bool forceAccessTokenRefresh = false) Parameters accessToken string refreshToken string forceAccessTokenRefresh bool Returns Task Exceptions GotrueException Raised when token combination is invalid. Settings() Retrieves the settings from the server public Task Settings() Returns Task Shutdown() Let all of the listeners know that the stateless client is being shutdown. In particular, the background thread that is used to refresh the token is stopped. public void Shutdown() SignIn(Provider, SignInOptions?) Retrieves a ProviderAuthState to redirect to for signing in with a Constants.Provider. This will likely be paired with a PKCE flow (set in SignInOptions) - after redirecting the user to the flow, you should pair with ExchangeCodeForSession(string, string) public Task SignIn(Constants.Provider provider, SignInOptions? options = null) Parameters provider Constants.Provider options SignInOptions Returns Task SignIn(SignInType, string, string?, string?) Log in an existing user, or login via a third-party provider. public Task SignIn(Constants.SignInType type, string identifierOrToken, string? password = null, string? scopes = null) Parameters type Constants.SignInType Type of Credentials being passed identifierOrToken string An email, phone, or RefreshToken password string Password to account (optional if RefreshToken) scopes string A space-separated list of scopes granted to the OAuth application. Returns Task SignIn(string, SignInOptions?) Sends a magic link login email to the specified email. public Task SignIn(string email, SignInOptions? options = null) Parameters email string options SignInOptions Returns Task SignIn(string, string) Signs in a User. public Task SignIn(string email, string password) Parameters email string password string Returns Task SignInAnonymously(SignInAnonymouslyOptions?) Creates a new anonymous user. public Task SignInAnonymously(SignInAnonymouslyOptions? options = null) Parameters options SignInAnonymouslyOptions Returns Task A session where the is_anonymous claim in the access token JWT set to true SignInWithIdToken(Provider, string, string?, string?) Allows signing in with an ID token issued by certain supported providers. The [idToken] is verified for validity and a new session is established. This method of signing in only supports [Provider.Google] or [Provider.Apple]. public Task SignInWithIdToken(Constants.Provider provider, string idToken, string? nonce = null, string? captchaToken = null) Parameters provider Constants.Provider A supported provider (Google, Apple) idToken string Provided from External Library nonce string Provided from External Library captchaToken string Provided from External Library Returns Task Remarks Calling this method will eliminate the current session (if any). SignInWithOtp(SignInWithPasswordlessEmailOptions) Log in a user using magiclink or a one-time password (OTP). If the {{ .ConfirmationURL }} variable is specified in the email template, a magiclink will be sent. If the {{ .Token }} variable is specified in the email template, an OTP will be sent. If you're using phone sign-ins, only an OTP will be sent. You won't be able to send a magiclink for phone sign-ins. Be aware that you may get back an error message that will not distinguish between the cases where the account does not exist or, that the account can only be accessed via social login. Do note that you will need to configure a Whatsapp sender on Twilio if you are using phone sign in with the 'whatsapp' channel. The whatsapp channel is not supported on other providers at this time. public Task SignInWithOtp(SignInWithPasswordlessEmailOptions options) Parameters options SignInWithPasswordlessEmailOptions Returns Task Remarks Calling this method will wipe out the current session (if any) SignInWithOtp(SignInWithPasswordlessPhoneOptions) Log in a user using magiclink or a one-time password (OTP). If the {{ .ConfirmationURL }} variable is specified in the email template, a magiclink will be sent. If the {{ .Token }} variable is specified in the email template, an OTP will be sent. If you're using phone sign-ins, only an OTP will be sent. You won't be able to send a magiclink for phone sign-ins. Be aware that you may get back an error message that will not distinguish between the cases where the account does not exist or, that the account can only be accessed via social login. Do note that you will need to configure a Whatsapp sender on Twilio if you are using phone sign in with the 'whatsapp' channel. The whatsapp channel is not supported on other providers at this time. public Task SignInWithOtp(SignInWithPasswordlessPhoneOptions options) Parameters options SignInWithPasswordlessPhoneOptions Returns Task Remarks Calling this method will wipe out the current session (if any) SignInWithPassword(string, string) Log in an existing user with an email and password or phone and password. public Task SignInWithPassword(string email, string password) Parameters email string password string Returns Task SignOut() Signs out a user and invalidates the current token. public Task SignOut() Returns Task SignUp(SignUpType, string, string, SignUpOptions?) Signs up a user public Task SignUp(Constants.SignUpType type, string identifier, string password, SignUpOptions? options = null) Parameters type Constants.SignUpType identifier string password string options SignUpOptions Object containing redirectTo and optional user metadata (data) Returns Task Remarks Calling this method will log out the current user session (if any). By default, the user needs to verify their email address before logging in. To turn this off, disable confirm email in your project. Confirm email determines if users need to confirm their email address after signing up. - If Confirm email is enabled, a user is returned but session is null. - If Confirm email is disabled, both a user and a session are returned. When the user confirms their email address, they are redirected to the SITE_URL by default. You can modify your SITE_URL or add additional redirect URLs in your project. If signUp() is called for an existing confirmed user: - If Confirm email is enabled in your project, an obfuscated/fake user object is returned. - If Confirm email is disabled, the error message, User already registered is returned. To fetch the currently logged-in user, refer to User. SignUp(string, string, SignUpOptions?) Signs up a user by email address. public Task SignUp(string email, string password, SignUpOptions? options = null) Parameters email string password string options SignUpOptions Object containing redirectTo and optional user metadata (data) Returns Task Remarks By default, the user needs to verify their email address before logging in. To turn this off, disable Confirm email in your project. Confirm email determines if users need to confirm their email address after signing up. - If Confirm email is enabled, a user is returned but session is null. - If Confirm email is disabled, both a user and a session are returned. When the user confirms their email address, they are redirected to the SITE_URL by default. You can modify your SITE_URL or add additional redirect URLs in your project. If signUp() is called for an existing confirmed user: - If Confirm email is enabled in your project, an obfuscated/fake user object is returned. - If Confirm email is disabled, the error message, User already registered is returned. To fetch the currently logged-in user, refer to User . UnlinkIdentity(UserIdentity) Unlinks an identity from a user by deleting it. The user will no longer be able to sign in with that identity once it's unlinked. public Task UnlinkIdentity(UserIdentity userIdentity) Parameters userIdentity UserIdentity Identity to be unlinked Returns Task Update(UserAttributes) Updates a User. public Task Update(UserAttributes attributes) Parameters attributes UserAttributes Returns Task VerifyOTP(string, string, EmailOtpType) Log in a user give a user supplied OTP received via email. public Task VerifyOTP(string email, string token, Constants.EmailOtpType type = EmailOtpType.MagicLink) Parameters email string token string type Constants.EmailOtpType Defaults to MagicLink Returns Task VerifyOTP(string, string, MobileOtpType) Log in a user given a User supplied OTP received via mobile. public Task VerifyOTP(string phone, string token, Constants.MobileOtpType type = MobileOtpType.SMS) Parameters phone string The user's phone number. token string Token sent to the user's phone. type Constants.MobileOtpType SMS or phone change Returns Task" + "keywords": "Class Client Namespace Supabase.Gotrue Assembly Supabase.Gotrue.dll public class Client : IGotrueClient, IGettableHeaders Inheritance object Client Implements IGotrueClient IGettableHeaders Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString() Constructors Client(ClientOptions?) Initializes the GoTrue stateful client. You will likely want to at least specify a ClientOptions.Url Sessions are not automatically retrieved when this object is created. If you want to load the session from your persistence store, GotrueSessionPersistence . If you want to load/refresh the session, RetrieveSessionAsync . For a typical client application, you'll want to load the session from persistence and then refresh it. If your application is listening for session changes, you'll get two SignIn notifications if the persisted session is valid - one for the session loaded from disk, and a second on a successful session refresh. var client = new Supabase.Gotrue.Client(options); client.LoadSession(); await client.RetrieveSessionAsync(); public Client(ClientOptions? options = null) Parameters options ClientOptions Properties CurrentSession The current Session as managed by this client. Does not refresh tokens or have any other side effects. You probably don't want to directly make changes to this object - you'll want to use other methods on this class to make changes. public Session? CurrentSession { get; } Property Value Session CurrentUser The currently logged in User. This is a local cache of the current session User. To persist modifications to the User you'll want to use other methods. Update(UserAttributes)> public User? CurrentUser { get; } Property Value User GetHeaders Headers sent to the API on every request. public Func>? GetHeaders { get; set; } Property Value Func> Online Indicates if the client should be considered online or offline. In a server environment, this client would likely always be online. On a mobile client, you will want to pair this with a network implementation to turn this on and off as the device goes online and offline. public bool Online { get; set; } Property Value bool Options Returns the client options. public ClientOptions Options { get; } Property Value ClientOptions TokenRefresh Get the TokenRefresh object, if it exists public TokenRefresh? TokenRefresh { get; } Property Value TokenRefresh Methods AddDebugListener(Action) Add a listener to get errors that occur outside of a typical Exception flow. In particular, this is used to get errors and messages from the background thread that automatically manages refreshing the user's token. public void AddDebugListener(Action listener) Parameters listener Action Callback method for debug messages AddStateChangedListener(AuthEventHandler) Adds a listener to be notified when the user state changes (e.g. the user logs in, logs out, the token is refreshed, etc). Constants.AuthState public void AddStateChangedListener(IGotrueClient.AuthEventHandler authEventHandler) Parameters authEventHandler IGotrueClient.AuthEventHandler ClearStateChangedListeners() Clears all of the listeners from receiving event state changes. WARNING: The persistence handler and refresh token thread are installed as state change listeners. Clearing the listeners will also delete these handlers. public void ClearStateChangedListeners() Debug(string, Exception?) Posts messages and exceptions to the debug listener. This is particularly useful for sorting out issues with the refresh token background thread. public void Debug(string message, Exception? e = null) Parameters message string e Exception ExchangeCodeForSession(string, string) Logs in an existing user via a third-party provider. public Task ExchangeCodeForSession(string codeVerifier, string authCode) Parameters codeVerifier string authCode string Returns Task GetSessionFromUrl(Uri, bool) Parses a Session out of a Uri's Query parameters. public Task GetSessionFromUrl(Uri uri, bool storeSession = true) Parameters uri Uri storeSession bool Returns Task GetUser(string) Get User details by JWT. Can be used to validate a JWT. public Task GetUser(string jwt) Parameters jwt string A valid JWT. Must be a JWT that originates from a user. Returns Task LinkIdentity(Provider, SignInOptions) Links an oauth identity to an existing user. This method requires the PKCE flow. public Task LinkIdentity(Constants.Provider provider, SignInOptions options) Parameters provider Constants.Provider Provider to Link options SignInOptions Returns Task LoadSession() Loads the session from the persistence layer. public void LoadSession() NotifyAuthStateChange(AuthState) Notifies all listeners that the current user auth state has changed. This is mainly used internally to fire notifications - most client applications won't need this. public void NotifyAuthStateChange(Constants.AuthState stateChanged) Parameters stateChanged Constants.AuthState Reauthenticate() Used for re-authenticating a user in password changes. See: https://github.com/supabase/gotrue#get-reauthenticate public Task Reauthenticate() Returns Task Exceptions GotrueException RefreshSession() Refreshes the currently logged in User's Session. public Task RefreshSession() Returns Task RefreshToken() Refreshes a Token using the current session. public Task RefreshToken() Returns Task RefreshToken(string, string) public Task RefreshToken(string accessToken, string refreshToken) Parameters accessToken string refreshToken string Returns Task RemoveStateChangedListener(AuthEventHandler) Removes a specified listener from event state changes. public void RemoveStateChangedListener(IGotrueClient.AuthEventHandler authEventHandler) Parameters authEventHandler IGotrueClient.AuthEventHandler ResetPasswordForEmail(ResetPasswordForEmailOptions) Sends a password reset request to an email address. Supports the PKCE Flow (the verifier from ResetPasswordForEmailState will be combined with ExchangeCodeForSession(string, string) in response) public Task ResetPasswordForEmail(ResetPasswordForEmailOptions options) Parameters options ResetPasswordForEmailOptions Returns Task ResetPasswordForEmail(string) Sends a reset request to an email address. public Task ResetPasswordForEmail(string email) Parameters email string Returns Task RetrieveSessionAsync() Typically called as part of the startup process for the client. This will take the currently loaded session (e.g. from a persistence implementation) and if possible attempt to refresh it. If the loaded session is expired or invalid, it will log the user out. public Task RetrieveSessionAsync() Returns Task SendMagicLink(string, SignInOptions?) Sends a Magic email login link to the specified email. Most of the interesting configuration for this flow is done in the Supabase/GoTrue admin panel. public Task SendMagicLink(string email, SignInOptions? options = null) Parameters email string options SignInOptions Returns Task SetPersistence(IGotrueSessionPersistence) Sets the persistence implementation for the client (e.g. file system, local storage, etc). public void SetPersistence(IGotrueSessionPersistence persistence) Parameters persistence IGotrueSessionPersistence SetSession(string, string, bool) Sets a new session given a user's access token and their refresh token. Will destroy the current session (if existing) Raise a SignedOut event. Decode token 3a. If expired (or bool forceAccessTokenRefresh set), force an access token refresh. 3b. If not expired, set the CurrentSession and retrieve CurrentUser from the server using the accessToken. Raise a `SignedIn event if successful. public Task SetSession(string accessToken, string refreshToken, bool forceAccessTokenRefresh = false) Parameters accessToken string refreshToken string forceAccessTokenRefresh bool Returns Task Exceptions GotrueException Raised when token combination is invalid. Settings() Retrieves the settings from the server public Task Settings() Returns Task Shutdown() Let all of the listeners know that the stateless client is being shutdown. In particular, the background thread that is used to refresh the token is stopped. public void Shutdown() SignIn(Provider, SignInOptions?) Retrieves a ProviderAuthState to redirect to for signing in with a Constants.Provider. This will likely be paired with a PKCE flow (set in SignInOptions) - after redirecting the user to the flow, you should pair with ExchangeCodeForSession(string, string) public Task SignIn(Constants.Provider provider, SignInOptions? options = null) Parameters provider Constants.Provider options SignInOptions Returns Task SignIn(SignInType, string, string?, string?) Log in an existing user, or login via a third-party provider. public Task SignIn(Constants.SignInType type, string identifierOrToken, string? password = null, string? scopes = null) Parameters type Constants.SignInType Type of Credentials being passed identifierOrToken string An email, phone, or RefreshToken password string Password to account (optional if RefreshToken) scopes string A space-separated list of scopes granted to the OAuth application. Returns Task SignIn(string, SignInOptions?) Sends a magic link login email to the specified email. public Task SignIn(string email, SignInOptions? options = null) Parameters email string options SignInOptions Returns Task SignIn(string, string) Signs in a User. public Task SignIn(string email, string password) Parameters email string password string Returns Task SignInAnonymously(SignInAnonymouslyOptions?) Creates a new anonymous user. public Task SignInAnonymously(SignInAnonymouslyOptions? options = null) Parameters options SignInAnonymouslyOptions Returns Task A session where the is_anonymous claim in the access token JWT set to true SignInWithIdToken(Provider, string, string?, string?, string?) Allows signing in with an ID token issued by certain supported providers. The [idToken] is verified for validity and a new session is established. This method of signing in only supports [Provider.Google] or [Provider.Apple]. public Task SignInWithIdToken(Constants.Provider provider, string idToken, string? accessToken = null, string? nonce = null, string? captchaToken = null) Parameters provider Constants.Provider Provider name or OIDC iss value identifying which provider should be used to verify the provided token. Supported names: google, apple, azure, facebook idToken string 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. accessToken string If the ID token contains an at_hash claim, then the hash of this value is compared to the value in the ID token. nonce string If the ID token contains a nonce claim, then the hash of this value is compared to the value in the ID token. captchaToken string Verification token received when the user completes the captcha on the site. Returns Task Remarks Calling this method will eliminate the current session (if any). SignInWithOtp(SignInWithPasswordlessEmailOptions) Log in a user using magiclink or a one-time password (OTP). If the {{ .ConfirmationURL }} variable is specified in the email template, a magiclink will be sent. If the {{ .Token }} variable is specified in the email template, an OTP will be sent. If you're using phone sign-ins, only an OTP will be sent. You won't be able to send a magiclink for phone sign-ins. Be aware that you may get back an error message that will not distinguish between the cases where the account does not exist or, that the account can only be accessed via social login. Do note that you will need to configure a Whatsapp sender on Twilio if you are using phone sign in with the 'whatsapp' channel. The whatsapp channel is not supported on other providers at this time. public Task SignInWithOtp(SignInWithPasswordlessEmailOptions options) Parameters options SignInWithPasswordlessEmailOptions Returns Task Remarks Calling this method will wipe out the current session (if any) SignInWithOtp(SignInWithPasswordlessPhoneOptions) Log in a user using magiclink or a one-time password (OTP). If the {{ .ConfirmationURL }} variable is specified in the email template, a magiclink will be sent. If the {{ .Token }} variable is specified in the email template, an OTP will be sent. If you're using phone sign-ins, only an OTP will be sent. You won't be able to send a magiclink for phone sign-ins. Be aware that you may get back an error message that will not distinguish between the cases where the account does not exist or, that the account can only be accessed via social login. Do note that you will need to configure a Whatsapp sender on Twilio if you are using phone sign in with the 'whatsapp' channel. The whatsapp channel is not supported on other providers at this time. public Task SignInWithOtp(SignInWithPasswordlessPhoneOptions options) Parameters options SignInWithPasswordlessPhoneOptions Returns Task Remarks Calling this method will wipe out the current session (if any) SignInWithPassword(string, string) Log in an existing user with an email and password or phone and password. public Task SignInWithPassword(string email, string password) Parameters email string password string Returns Task SignOut() Signs out a user and invalidates the current token. public Task SignOut() Returns Task SignUp(SignUpType, string, string, SignUpOptions?) Signs up a user public Task SignUp(Constants.SignUpType type, string identifier, string password, SignUpOptions? options = null) Parameters type Constants.SignUpType identifier string password string options SignUpOptions Object containing redirectTo and optional user metadata (data) Returns Task Remarks Calling this method will log out the current user session (if any). By default, the user needs to verify their email address before logging in. To turn this off, disable confirm email in your project. Confirm email determines if users need to confirm their email address after signing up. - If Confirm email is enabled, a user is returned but session is null. - If Confirm email is disabled, both a user and a session are returned. When the user confirms their email address, they are redirected to the SITE_URL by default. You can modify your SITE_URL or add additional redirect URLs in your project. If signUp() is called for an existing confirmed user: - If Confirm email is enabled in your project, an obfuscated/fake user object is returned. - If Confirm email is disabled, the error message, User already registered is returned. To fetch the currently logged-in user, refer to User. SignUp(string, string, SignUpOptions?) Signs up a user by email address. public Task SignUp(string email, string password, SignUpOptions? options = null) Parameters email string password string options SignUpOptions Object containing redirectTo and optional user metadata (data) Returns Task Remarks By default, the user needs to verify their email address before logging in. To turn this off, disable Confirm email in your project. Confirm email determines if users need to confirm their email address after signing up. - If Confirm email is enabled, a user is returned but session is null. - If Confirm email is disabled, both a user and a session are returned. When the user confirms their email address, they are redirected to the SITE_URL by default. You can modify your SITE_URL or add additional redirect URLs in your project. If signUp() is called for an existing confirmed user: - If Confirm email is enabled in your project, an obfuscated/fake user object is returned. - If Confirm email is disabled, the error message, User already registered is returned. To fetch the currently logged-in user, refer to User . UnlinkIdentity(UserIdentity) Unlinks an identity from a user by deleting it. The user will no longer be able to sign in with that identity once it's unlinked. public Task UnlinkIdentity(UserIdentity userIdentity) Parameters userIdentity UserIdentity Identity to be unlinked Returns Task Update(UserAttributes) Updates a User. public Task Update(UserAttributes attributes) Parameters attributes UserAttributes Returns Task VerifyOTP(string, string, EmailOtpType) Log in a user give a user supplied OTP received via email. public Task VerifyOTP(string email, string token, Constants.EmailOtpType type = EmailOtpType.MagicLink) Parameters email string token string type Constants.EmailOtpType Defaults to MagicLink Returns Task VerifyOTP(string, string, MobileOtpType) Log in a user given a User supplied OTP received via mobile. public Task VerifyOTP(string phone, string token, Constants.MobileOtpType type = MobileOtpType.SMS) Parameters phone string The user's phone number. token string Token sent to the user's phone. type Constants.MobileOtpType SMS or phone change Returns Task" }, "api/Supabase.Gotrue.ClientOptions.html": { "href": "api/Supabase.Gotrue.ClientOptions.html", @@ -132,7 +132,7 @@ "api/Supabase.Gotrue.Interfaces.IGotrueApi-2.html": { "href": "api/Supabase.Gotrue.Interfaces.IGotrueApi-2.html", "title": "Interface IGotrueApi | gotrue-csharp", - "keywords": "Interface IGotrueApi Namespace Supabase.Gotrue.Interfaces Assembly Supabase.Gotrue.dll public interface IGotrueApi : IGettableHeaders where TUser : User where TSession : Session Type Parameters TUser TSession Inherited Members IGettableHeaders.GetHeaders Methods CreateUser(string, AdminUserAttributes?) Task CreateUser(string jwt, AdminUserAttributes? attributes = null) Parameters jwt string attributes AdminUserAttributes Returns Task DeleteUser(string, string) Task DeleteUser(string uid, string jwt) Parameters uid string jwt string Returns Task ExchangeCodeForSession(string, string) Task ExchangeCodeForSession(string codeVerifier, string authCode) Parameters codeVerifier string authCode string Returns Task GenerateLink(string, GenerateLinkOptions) Task GenerateLink(string jwt, GenerateLinkOptions options) Parameters jwt string options GenerateLinkOptions Returns Task GetUriForProvider(Provider, SignInOptions?) ProviderAuthState GetUriForProvider(Constants.Provider provider, SignInOptions? options = null) Parameters provider Constants.Provider options SignInOptions Returns ProviderAuthState GetUser(string) Task GetUser(string jwt) Parameters jwt string Returns Task GetUserById(string, string) Task GetUserById(string jwt, string userId) Parameters jwt string userId string Returns Task InviteUserByEmail(string, string, InviteUserByEmailOptions?) Task InviteUserByEmail(string email, string jwt, InviteUserByEmailOptions? options = null) Parameters email string jwt string options InviteUserByEmailOptions Returns Task LinkIdentity(string, Provider, SignInOptions) Links an oauth identity to an existing user. This method requires the PKCE flow. Task LinkIdentity(string token, Constants.Provider provider, SignInOptions options) Parameters token string User's token provider Constants.Provider Provider to Link options SignInOptions Returns Task ListUsers(string, string?, string?, SortOrder, int?, int?) Task?> ListUsers(string jwt, string? filter = null, string? sortBy = null, Constants.SortOrder sortOrder = SortOrder.Descending, int? page = null, int? perPage = null) Parameters jwt string filter string sortBy string sortOrder Constants.SortOrder page int? perPage int? Returns Task> Reauthenticate(string) Task Reauthenticate(string userJwt) Parameters userJwt string Returns Task RefreshAccessToken(string, string) Task RefreshAccessToken(string accessToken, string refreshToken) Parameters accessToken string refreshToken string Returns Task ResetPasswordForEmail(ResetPasswordForEmailOptions) Task ResetPasswordForEmail(ResetPasswordForEmailOptions options) Parameters options ResetPasswordForEmailOptions Returns Task ResetPasswordForEmail(string) Task ResetPasswordForEmail(string email) Parameters email string Returns Task SendMagicLinkEmail(string, SignInOptions?) Task SendMagicLinkEmail(string email, SignInOptions? options = null) Parameters email string options SignInOptions Returns Task SendMobileOTP(string) Task SendMobileOTP(string phone) Parameters phone string Returns Task Settings() Task Settings() Returns Task SignInAnonymously(SignInAnonymouslyOptions?) Task SignInAnonymously(SignInAnonymouslyOptions? options = null) Parameters options SignInAnonymouslyOptions Returns Task SignInWithEmail(string, string) Task SignInWithEmail(string email, string password) Parameters email string password string Returns Task SignInWithIdToken(Provider, string, string?, string?) Task SignInWithIdToken(Constants.Provider provider, string idToken, string? nonce = null, string? captchaToken = null) Parameters provider Constants.Provider idToken string nonce string captchaToken string Returns Task SignInWithOtp(SignInWithPasswordlessEmailOptions) Task SignInWithOtp(SignInWithPasswordlessEmailOptions options) Parameters options SignInWithPasswordlessEmailOptions Returns Task SignInWithOtp(SignInWithPasswordlessPhoneOptions) Task SignInWithOtp(SignInWithPasswordlessPhoneOptions options) Parameters options SignInWithPasswordlessPhoneOptions Returns Task SignInWithPhone(string, string) Task SignInWithPhone(string phone, string password) Parameters phone string password string Returns Task SignOut(string) Task SignOut(string jwt) Parameters jwt string Returns Task SignUpWithEmail(string, string, SignUpOptions?) Task SignUpWithEmail(string email, string password, SignUpOptions? options = null) Parameters email string password string options SignUpOptions Returns Task SignUpWithPhone(string, string, SignUpOptions?) Task SignUpWithPhone(string phone, string password, SignUpOptions? options = null) Parameters phone string password string options SignUpOptions Returns Task UnlinkIdentity(string, UserIdentity) Unlinks an identity from a user by deleting it. The user will no longer be able to sign in with that identity once it's unlinked. Task UnlinkIdentity(string token, UserIdentity userIdentity) Parameters token string User's token userIdentity UserIdentity Identity to be unlinked Returns Task UpdateUser(string, UserAttributes) Task UpdateUser(string jwt, UserAttributes attributes) Parameters jwt string attributes UserAttributes Returns Task UpdateUserById(string, string, UserAttributes) Task UpdateUserById(string jwt, string userId, UserAttributes userData) Parameters jwt string userId string userData UserAttributes Returns Task VerifyEmailOTP(string, string, EmailOtpType) Task VerifyEmailOTP(string email, string token, Constants.EmailOtpType type) Parameters email string token string type Constants.EmailOtpType Returns Task VerifyMobileOTP(string, string, MobileOtpType) Task VerifyMobileOTP(string phone, string token, Constants.MobileOtpType type) Parameters phone string token string type Constants.MobileOtpType Returns Task" + "keywords": "Interface IGotrueApi Namespace Supabase.Gotrue.Interfaces Assembly Supabase.Gotrue.dll public interface IGotrueApi : IGettableHeaders where TUser : User where TSession : Session Type Parameters TUser TSession Inherited Members IGettableHeaders.GetHeaders Methods CreateUser(string, AdminUserAttributes?) Task CreateUser(string jwt, AdminUserAttributes? attributes = null) Parameters jwt string attributes AdminUserAttributes Returns Task DeleteUser(string, string) Task DeleteUser(string uid, string jwt) Parameters uid string jwt string Returns Task ExchangeCodeForSession(string, string) Task ExchangeCodeForSession(string codeVerifier, string authCode) Parameters codeVerifier string authCode string Returns Task GenerateLink(string, GenerateLinkOptions) Task GenerateLink(string jwt, GenerateLinkOptions options) Parameters jwt string options GenerateLinkOptions Returns Task GetUriForProvider(Provider, SignInOptions?) ProviderAuthState GetUriForProvider(Constants.Provider provider, SignInOptions? options = null) Parameters provider Constants.Provider options SignInOptions Returns ProviderAuthState GetUser(string) Task GetUser(string jwt) Parameters jwt string Returns Task GetUserById(string, string) Task GetUserById(string jwt, string userId) Parameters jwt string userId string Returns Task InviteUserByEmail(string, string, InviteUserByEmailOptions?) Task InviteUserByEmail(string email, string jwt, InviteUserByEmailOptions? options = null) Parameters email string jwt string options InviteUserByEmailOptions Returns Task LinkIdentity(string, Provider, SignInOptions) Links an oauth identity to an existing user. This method requires the PKCE flow. Task LinkIdentity(string token, Constants.Provider provider, SignInOptions options) Parameters token string User's token provider Constants.Provider Provider to Link options SignInOptions Returns Task ListUsers(string, string?, string?, SortOrder, int?, int?) Task?> ListUsers(string jwt, string? filter = null, string? sortBy = null, Constants.SortOrder sortOrder = SortOrder.Descending, int? page = null, int? perPage = null) Parameters jwt string filter string sortBy string sortOrder Constants.SortOrder page int? perPage int? Returns Task> Reauthenticate(string) Task Reauthenticate(string userJwt) Parameters userJwt string Returns Task RefreshAccessToken(string, string) Task RefreshAccessToken(string accessToken, string refreshToken) Parameters accessToken string refreshToken string Returns Task ResetPasswordForEmail(ResetPasswordForEmailOptions) Task ResetPasswordForEmail(ResetPasswordForEmailOptions options) Parameters options ResetPasswordForEmailOptions Returns Task ResetPasswordForEmail(string) Task ResetPasswordForEmail(string email) Parameters email string Returns Task SendMagicLinkEmail(string, SignInOptions?) Task SendMagicLinkEmail(string email, SignInOptions? options = null) Parameters email string options SignInOptions Returns Task SendMobileOTP(string) Task SendMobileOTP(string phone) Parameters phone string Returns Task Settings() Task Settings() Returns Task SignInAnonymously(SignInAnonymouslyOptions?) Task SignInAnonymously(SignInAnonymouslyOptions? options = null) Parameters options SignInAnonymouslyOptions Returns Task SignInWithEmail(string, string) Task SignInWithEmail(string email, string password) Parameters email string password string Returns Task SignInWithIdToken(Provider, string, string?, string?, string?) Task SignInWithIdToken(Constants.Provider provider, string idToken, string? accessToken = null, string? nonce = null, string? captchaToken = null) Parameters provider Constants.Provider idToken string accessToken string nonce string captchaToken string Returns Task SignInWithOtp(SignInWithPasswordlessEmailOptions) Task SignInWithOtp(SignInWithPasswordlessEmailOptions options) Parameters options SignInWithPasswordlessEmailOptions Returns Task SignInWithOtp(SignInWithPasswordlessPhoneOptions) Task SignInWithOtp(SignInWithPasswordlessPhoneOptions options) Parameters options SignInWithPasswordlessPhoneOptions Returns Task SignInWithPhone(string, string) Task SignInWithPhone(string phone, string password) Parameters phone string password string Returns Task SignOut(string) Task SignOut(string jwt) Parameters jwt string Returns Task SignUpWithEmail(string, string, SignUpOptions?) Task SignUpWithEmail(string email, string password, SignUpOptions? options = null) Parameters email string password string options SignUpOptions Returns Task SignUpWithPhone(string, string, SignUpOptions?) Task SignUpWithPhone(string phone, string password, SignUpOptions? options = null) Parameters phone string password string options SignUpOptions Returns Task UnlinkIdentity(string, UserIdentity) Unlinks an identity from a user by deleting it. The user will no longer be able to sign in with that identity once it's unlinked. Task UnlinkIdentity(string token, UserIdentity userIdentity) Parameters token string User's token userIdentity UserIdentity Identity to be unlinked Returns Task UpdateUser(string, UserAttributes) Task UpdateUser(string jwt, UserAttributes attributes) Parameters jwt string attributes UserAttributes Returns Task UpdateUserById(string, string, UserAttributes) Task UpdateUserById(string jwt, string userId, UserAttributes userData) Parameters jwt string userId string userData UserAttributes Returns Task VerifyEmailOTP(string, string, EmailOtpType) Task VerifyEmailOTP(string email, string token, Constants.EmailOtpType type) Parameters email string token string type Constants.EmailOtpType Returns Task VerifyMobileOTP(string, string, MobileOtpType) Task VerifyMobileOTP(string phone, string token, Constants.MobileOtpType type) Parameters phone string token string type Constants.MobileOtpType Returns Task" }, "api/Supabase.Gotrue.Interfaces.IGotrueClient-2.AuthEventHandler.html": { "href": "api/Supabase.Gotrue.Interfaces.IGotrueClient-2.AuthEventHandler.html", @@ -142,7 +142,7 @@ "api/Supabase.Gotrue.Interfaces.IGotrueClient-2.html": { "href": "api/Supabase.Gotrue.Interfaces.IGotrueClient-2.html", "title": "Interface IGotrueClient | gotrue-csharp", - "keywords": "Interface IGotrueClient Namespace Supabase.Gotrue.Interfaces Assembly Supabase.Gotrue.dll GoTrue stateful Client. This class is best used as a long-lived singleton object in your application. You can attach listeners to be notified of changes to the user log in state, a persistence system for sessions across application launches, and more. It includes a (optional, on by default) background thread that runs to refresh the user's session token. Check out the test suite for examples of use. public interface IGotrueClient : IGettableHeaders where TUser : User where TSession : Session Type Parameters TUser GoTrue stateful Client. This class is best used as a long-lived singleton object in your application. You can attach listeners to be notified of changes to the user log in state, a persistence system for sessions across application launches, and more. It includes a (optional, on by default) background thread that runs to refresh the user's session token. Check out the test suite for examples of use. TSession GoTrue stateful Client. This class is best used as a long-lived singleton object in your application. You can attach listeners to be notified of changes to the user log in state, a persistence system for sessions across application launches, and more. It includes a (optional, on by default) background thread that runs to refresh the user's session token. Check out the test suite for examples of use. Inherited Members IGettableHeaders.GetHeaders Examples var client = new Supabase.Gotrue.Client(options); var user = await client.SignIn(\"user@email.com\", \"fancyPassword\"); Properties CurrentSession The current Session as managed by this client. Does not refresh tokens or have any other side effects. You probably don't want to directly make changes to this object - you'll want to use other methods on this class to make changes. TSession? CurrentSession { get; } Property Value TSession CurrentUser The currently logged in User. This is a local cache of the current session User. To persist modifications to the User you'll want to use other methods. Update(UserAttributes)> TUser? CurrentUser { get; } Property Value TUser Online Indicates if the client should be considered online or offline. In a server environment, this client would likely always be online. On a mobile client, you will want to pair this with a network implementation to turn this on and off as the device goes online and offline. bool Online { get; set; } Property Value bool Options Returns the client options. ClientOptions Options { get; } Property Value ClientOptions Methods AddDebugListener(Action) Add a listener to get errors that occur outside of a typical Exception flow. In particular, this is used to get errors and messages from the background thread that automatically manages refreshing the user's token. void AddDebugListener(Action listener) Parameters listener Action Callback method for debug messages AddStateChangedListener(AuthEventHandler) Adds a listener to be notified when the user state changes (e.g. the user logs in, logs out, the token is refreshed, etc). Constants.AuthState void AddStateChangedListener(IGotrueClient.AuthEventHandler authEventHandler) Parameters authEventHandler IGotrueClient.AuthEventHandler ClearStateChangedListeners() Clears all of the listeners from receiving event state changes. WARNING: The persistence handler and refresh token thread are installed as state change listeners. Clearing the listeners will also delete these handlers. void ClearStateChangedListeners() Debug(string, Exception?) Posts messages and exceptions to the debug listener. This is particularly useful for sorting out issues with the refresh token background thread. void Debug(string message, Exception? e = null) Parameters message string e Exception ExchangeCodeForSession(string, string) Logs in an existing user via a third-party provider. Task ExchangeCodeForSession(string codeVerifier, string authCode) Parameters codeVerifier string authCode string Returns Task GetSessionFromUrl(Uri, bool) Converts a URL to a session. For client apps, this probably requires setting up URL handlers. Task GetSessionFromUrl(Uri uri, bool storeSession = true) Parameters uri Uri storeSession bool Returns Task GetUser(string) Get User details by JWT. Can be used to validate a JWT. Task GetUser(string jwt) Parameters jwt string A valid JWT. Must be a JWT that originates from a user. Returns Task LinkIdentity(Provider, SignInOptions) Links an oauth identity to an existing user. This method requires the PKCE flow. Task LinkIdentity(Constants.Provider provider, SignInOptions options) Parameters provider Constants.Provider Provider to Link options SignInOptions Returns Task LoadSession() Loads the session from the persistence layer. void LoadSession() NotifyAuthStateChange(AuthState) Notifies all listeners that the current user auth state has changed. This is mainly used internally to fire notifications - most client applications won't need this. void NotifyAuthStateChange(Constants.AuthState stateChanged) Parameters stateChanged Constants.AuthState Reauthenticate() Used for re-authenticating a user in password changes. See: https://github.com/supabase/gotrue#get-reauthenticate Task Reauthenticate() Returns Task Exceptions GotrueException RefreshSession() Refreshes the currently logged in User's Session. Task RefreshSession() Returns Task RefreshToken() Refreshes a Token using the current session. Task RefreshToken() Returns Task RemoveStateChangedListener(AuthEventHandler) Removes a specified listener from event state changes. void RemoveStateChangedListener(IGotrueClient.AuthEventHandler authEventHandler) Parameters authEventHandler IGotrueClient.AuthEventHandler ResetPasswordForEmail(ResetPasswordForEmailOptions) Sends a password reset request to an email address. Supports the PKCE Flow (the verifier from ResetPasswordForEmailState will be combined with ExchangeCodeForSession(string, string) in response) Task ResetPasswordForEmail(ResetPasswordForEmailOptions options) Parameters options ResetPasswordForEmailOptions Returns Task ResetPasswordForEmail(string) Sends a reset request to an email address. Task ResetPasswordForEmail(string email) Parameters email string Returns Task RetrieveSessionAsync() Typically called as part of the startup process for the client. This will take the currently loaded session (e.g. from a persistence implementation) and if possible attempt to refresh it. If the loaded session is expired or invalid, it will log the user out. Task RetrieveSessionAsync() Returns Task SendMagicLink(string, SignInOptions?) Sends a Magic email login link to the specified email. Most of the interesting configuration for this flow is done in the Supabase/GoTrue admin panel. Task SendMagicLink(string email, SignInOptions? options = null) Parameters email string options SignInOptions Returns Task SetPersistence(IGotrueSessionPersistence) Sets the persistence implementation for the client (e.g. file system, local storage, etc). void SetPersistence(IGotrueSessionPersistence persistence) Parameters persistence IGotrueSessionPersistence SetSession(string, string, bool) Sets a new session given a user's access token and their refresh token. Will destroy the current session (if existing) Raise a SignedOut event. Decode token 3a. If expired (or bool forceAccessTokenRefresh set), force an access token refresh. 3b. If not expired, set the CurrentSession and retrieve CurrentUser from the server using the accessToken. Raise a `SignedIn event if successful. Task SetSession(string accessToken, string refreshToken, bool forceAccessTokenRefresh = false) Parameters accessToken string refreshToken string forceAccessTokenRefresh bool Returns Task Exceptions GotrueException Raised when token combination is invalid. Settings() Retrieves the settings from the server Task Settings() Returns Task Shutdown() Let all of the listeners know that the stateless client is being shutdown. In particular, the background thread that is used to refresh the token is stopped. void Shutdown() SignIn(Provider, SignInOptions?) Retrieves a ProviderAuthState to redirect to for signing in with a Constants.Provider. This will likely be paired with a PKCE flow (set in SignInOptions) - after redirecting the user to the flow, you should pair with ExchangeCodeForSession(string, string) Task SignIn(Constants.Provider provider, SignInOptions? options = null) Parameters provider Constants.Provider options SignInOptions Returns Task SignIn(SignInType, string, string?, string?) Log in an existing user, or login via a third-party provider. Task SignIn(Constants.SignInType type, string identifierOrToken, string? password = null, string? scopes = null) Parameters type Constants.SignInType Type of Credentials being passed identifierOrToken string An email, phone, or RefreshToken password string Password to account (optional if RefreshToken) scopes string A space-separated list of scopes granted to the OAuth application. Returns Task SignIn(string, SignInOptions?) Sends a magic link login email to the specified email. Task SignIn(string email, SignInOptions? options = null) Parameters email string options SignInOptions Returns Task SignIn(string, string) Signs in a User. Task SignIn(string email, string password) Parameters email string password string Returns Task SignInAnonymously(SignInAnonymouslyOptions?) Creates a new anonymous user. Task SignInAnonymously(SignInAnonymouslyOptions? options = null) Parameters options SignInAnonymouslyOptions Returns Task A session where the is_anonymous claim in the access token JWT set to true SignInWithIdToken(Provider, string, string?, string?) Allows signing in with an ID token issued by certain supported providers. The [idToken] is verified for validity and a new session is established. This method of signing in only supports [Provider.Google] or [Provider.Apple]. Task SignInWithIdToken(Constants.Provider provider, string idToken, string? nonce = null, string? captchaToken = null) Parameters provider Constants.Provider A supported provider (Google, Apple) idToken string Provided from External Library nonce string Provided from External Library captchaToken string Provided from External Library Returns Task Remarks Calling this method will eliminate the current session (if any). SignInWithOtp(SignInWithPasswordlessEmailOptions) Log in a user using magiclink or a one-time password (OTP). If the {{ .ConfirmationURL }} variable is specified in the email template, a magiclink will be sent. If the {{ .Token }} variable is specified in the email template, an OTP will be sent. If you're using phone sign-ins, only an OTP will be sent. You won't be able to send a magiclink for phone sign-ins. Be aware that you may get back an error message that will not distinguish between the cases where the account does not exist or, that the account can only be accessed via social login. Do note that you will need to configure a Whatsapp sender on Twilio if you are using phone sign in with the 'whatsapp' channel. The whatsapp channel is not supported on other providers at this time. Task SignInWithOtp(SignInWithPasswordlessEmailOptions options) Parameters options SignInWithPasswordlessEmailOptions Returns Task Remarks Calling this method will wipe out the current session (if any) SignInWithOtp(SignInWithPasswordlessPhoneOptions) Log in a user using magiclink or a one-time password (OTP). If the {{ .ConfirmationURL }} variable is specified in the email template, a magiclink will be sent. If the {{ .Token }} variable is specified in the email template, an OTP will be sent. If you're using phone sign-ins, only an OTP will be sent. You won't be able to send a magiclink for phone sign-ins. Be aware that you may get back an error message that will not distinguish between the cases where the account does not exist or, that the account can only be accessed via social login. Do note that you will need to configure a Whatsapp sender on Twilio if you are using phone sign in with the 'whatsapp' channel. The whatsapp channel is not supported on other providers at this time. Task SignInWithOtp(SignInWithPasswordlessPhoneOptions options) Parameters options SignInWithPasswordlessPhoneOptions Returns Task Remarks Calling this method will wipe out the current session (if any) SignInWithPassword(string, string) Log in an existing user with an email and password or phone and password. Task SignInWithPassword(string email, string password) Parameters email string password string Returns Task SignOut() Signs out a user and invalidates the current token. Task SignOut() Returns Task SignUp(SignUpType, string, string, SignUpOptions?) Signs up a user Task SignUp(Constants.SignUpType type, string identifier, string password, SignUpOptions? options = null) Parameters type Constants.SignUpType identifier string password string options SignUpOptions Object containing redirectTo and optional user metadata (data) Returns Task Remarks Calling this method will log out the current user session (if any). By default, the user needs to verify their email address before logging in. To turn this off, disable confirm email in your project. Confirm email determines if users need to confirm their email address after signing up. - If Confirm email is enabled, a user is returned but session is null. - If Confirm email is disabled, both a user and a session are returned. When the user confirms their email address, they are redirected to the SITE_URL by default. You can modify your SITE_URL or add additional redirect URLs in your project. If signUp() is called for an existing confirmed user: - If Confirm email is enabled in your project, an obfuscated/fake user object is returned. - If Confirm email is disabled, the error message, User already registered is returned. To fetch the currently logged-in user, refer to User. SignUp(string, string, SignUpOptions?) Signs up a user by email address. Task SignUp(string email, string password, SignUpOptions? options = null) Parameters email string password string options SignUpOptions Object containing redirectTo and optional user metadata (data) Returns Task Remarks By default, the user needs to verify their email address before logging in. To turn this off, disable Confirm email in your project. Confirm email determines if users need to confirm their email address after signing up. - If Confirm email is enabled, a user is returned but session is null. - If Confirm email is disabled, both a user and a session are returned. When the user confirms their email address, they are redirected to the SITE_URL by default. You can modify your SITE_URL or add additional redirect URLs in your project. If signUp() is called for an existing confirmed user: - If Confirm email is enabled in your project, an obfuscated/fake user object is returned. - If Confirm email is disabled, the error message, User already registered is returned. To fetch the currently logged-in user, refer to User . UnlinkIdentity(UserIdentity) Unlinks an identity from a user by deleting it. The user will no longer be able to sign in with that identity once it's unlinked. Task UnlinkIdentity(UserIdentity userIdentity) Parameters userIdentity UserIdentity Identity to be unlinked Returns Task Update(UserAttributes) Updates a User. Task Update(UserAttributes attributes) Parameters attributes UserAttributes Returns Task VerifyOTP(string, string, EmailOtpType) Log in a user give a user supplied OTP received via email. Task VerifyOTP(string email, string token, Constants.EmailOtpType type = EmailOtpType.MagicLink) Parameters email string token string type Constants.EmailOtpType Defaults to MagicLink Returns Task VerifyOTP(string, string, MobileOtpType) Log in a user given a User supplied OTP received via mobile. Task VerifyOTP(string phone, string token, Constants.MobileOtpType type = MobileOtpType.SMS) Parameters phone string The user's phone number. token string Token sent to the user's phone. type Constants.MobileOtpType SMS or phone change Returns Task" + "keywords": "Interface IGotrueClient Namespace Supabase.Gotrue.Interfaces Assembly Supabase.Gotrue.dll GoTrue stateful Client. This class is best used as a long-lived singleton object in your application. You can attach listeners to be notified of changes to the user log in state, a persistence system for sessions across application launches, and more. It includes a (optional, on by default) background thread that runs to refresh the user's session token. Check out the test suite for examples of use. public interface IGotrueClient : IGettableHeaders where TUser : User where TSession : Session Type Parameters TUser GoTrue stateful Client. This class is best used as a long-lived singleton object in your application. You can attach listeners to be notified of changes to the user log in state, a persistence system for sessions across application launches, and more. It includes a (optional, on by default) background thread that runs to refresh the user's session token. Check out the test suite for examples of use. TSession GoTrue stateful Client. This class is best used as a long-lived singleton object in your application. You can attach listeners to be notified of changes to the user log in state, a persistence system for sessions across application launches, and more. It includes a (optional, on by default) background thread that runs to refresh the user's session token. Check out the test suite for examples of use. Inherited Members IGettableHeaders.GetHeaders Examples var client = new Supabase.Gotrue.Client(options); var user = await client.SignIn(\"user@email.com\", \"fancyPassword\"); Properties CurrentSession The current Session as managed by this client. Does not refresh tokens or have any other side effects. You probably don't want to directly make changes to this object - you'll want to use other methods on this class to make changes. TSession? CurrentSession { get; } Property Value TSession CurrentUser The currently logged in User. This is a local cache of the current session User. To persist modifications to the User you'll want to use other methods. Update(UserAttributes)> TUser? CurrentUser { get; } Property Value TUser Online Indicates if the client should be considered online or offline. In a server environment, this client would likely always be online. On a mobile client, you will want to pair this with a network implementation to turn this on and off as the device goes online and offline. bool Online { get; set; } Property Value bool Options Returns the client options. ClientOptions Options { get; } Property Value ClientOptions Methods AddDebugListener(Action) Add a listener to get errors that occur outside of a typical Exception flow. In particular, this is used to get errors and messages from the background thread that automatically manages refreshing the user's token. void AddDebugListener(Action listener) Parameters listener Action Callback method for debug messages AddStateChangedListener(AuthEventHandler) Adds a listener to be notified when the user state changes (e.g. the user logs in, logs out, the token is refreshed, etc). Constants.AuthState void AddStateChangedListener(IGotrueClient.AuthEventHandler authEventHandler) Parameters authEventHandler IGotrueClient.AuthEventHandler ClearStateChangedListeners() Clears all of the listeners from receiving event state changes. WARNING: The persistence handler and refresh token thread are installed as state change listeners. Clearing the listeners will also delete these handlers. void ClearStateChangedListeners() Debug(string, Exception?) Posts messages and exceptions to the debug listener. This is particularly useful for sorting out issues with the refresh token background thread. void Debug(string message, Exception? e = null) Parameters message string e Exception ExchangeCodeForSession(string, string) Logs in an existing user via a third-party provider. Task ExchangeCodeForSession(string codeVerifier, string authCode) Parameters codeVerifier string authCode string Returns Task GetSessionFromUrl(Uri, bool) Converts a URL to a session. For client apps, this probably requires setting up URL handlers. Task GetSessionFromUrl(Uri uri, bool storeSession = true) Parameters uri Uri storeSession bool Returns Task GetUser(string) Get User details by JWT. Can be used to validate a JWT. Task GetUser(string jwt) Parameters jwt string A valid JWT. Must be a JWT that originates from a user. Returns Task LinkIdentity(Provider, SignInOptions) Links an oauth identity to an existing user. This method requires the PKCE flow. Task LinkIdentity(Constants.Provider provider, SignInOptions options) Parameters provider Constants.Provider Provider to Link options SignInOptions Returns Task LoadSession() Loads the session from the persistence layer. void LoadSession() NotifyAuthStateChange(AuthState) Notifies all listeners that the current user auth state has changed. This is mainly used internally to fire notifications - most client applications won't need this. void NotifyAuthStateChange(Constants.AuthState stateChanged) Parameters stateChanged Constants.AuthState Reauthenticate() Used for re-authenticating a user in password changes. See: https://github.com/supabase/gotrue#get-reauthenticate Task Reauthenticate() Returns Task Exceptions GotrueException RefreshSession() Refreshes the currently logged in User's Session. Task RefreshSession() Returns Task RefreshToken() Refreshes a Token using the current session. Task RefreshToken() Returns Task RemoveStateChangedListener(AuthEventHandler) Removes a specified listener from event state changes. void RemoveStateChangedListener(IGotrueClient.AuthEventHandler authEventHandler) Parameters authEventHandler IGotrueClient.AuthEventHandler ResetPasswordForEmail(ResetPasswordForEmailOptions) Sends a password reset request to an email address. Supports the PKCE Flow (the verifier from ResetPasswordForEmailState will be combined with ExchangeCodeForSession(string, string) in response) Task ResetPasswordForEmail(ResetPasswordForEmailOptions options) Parameters options ResetPasswordForEmailOptions Returns Task ResetPasswordForEmail(string) Sends a reset request to an email address. Task ResetPasswordForEmail(string email) Parameters email string Returns Task RetrieveSessionAsync() Typically called as part of the startup process for the client. This will take the currently loaded session (e.g. from a persistence implementation) and if possible attempt to refresh it. If the loaded session is expired or invalid, it will log the user out. Task RetrieveSessionAsync() Returns Task SendMagicLink(string, SignInOptions?) Sends a Magic email login link to the specified email. Most of the interesting configuration for this flow is done in the Supabase/GoTrue admin panel. Task SendMagicLink(string email, SignInOptions? options = null) Parameters email string options SignInOptions Returns Task SetPersistence(IGotrueSessionPersistence) Sets the persistence implementation for the client (e.g. file system, local storage, etc). void SetPersistence(IGotrueSessionPersistence persistence) Parameters persistence IGotrueSessionPersistence SetSession(string, string, bool) Sets a new session given a user's access token and their refresh token. Will destroy the current session (if existing) Raise a SignedOut event. Decode token 3a. If expired (or bool forceAccessTokenRefresh set), force an access token refresh. 3b. If not expired, set the CurrentSession and retrieve CurrentUser from the server using the accessToken. Raise a `SignedIn event if successful. Task SetSession(string accessToken, string refreshToken, bool forceAccessTokenRefresh = false) Parameters accessToken string refreshToken string forceAccessTokenRefresh bool Returns Task Exceptions GotrueException Raised when token combination is invalid. Settings() Retrieves the settings from the server Task Settings() Returns Task Shutdown() Let all of the listeners know that the stateless client is being shutdown. In particular, the background thread that is used to refresh the token is stopped. void Shutdown() SignIn(Provider, SignInOptions?) Retrieves a ProviderAuthState to redirect to for signing in with a Constants.Provider. This will likely be paired with a PKCE flow (set in SignInOptions) - after redirecting the user to the flow, you should pair with ExchangeCodeForSession(string, string) Task SignIn(Constants.Provider provider, SignInOptions? options = null) Parameters provider Constants.Provider options SignInOptions Returns Task SignIn(SignInType, string, string?, string?) Log in an existing user, or login via a third-party provider. Task SignIn(Constants.SignInType type, string identifierOrToken, string? password = null, string? scopes = null) Parameters type Constants.SignInType Type of Credentials being passed identifierOrToken string An email, phone, or RefreshToken password string Password to account (optional if RefreshToken) scopes string A space-separated list of scopes granted to the OAuth application. Returns Task SignIn(string, SignInOptions?) Sends a magic link login email to the specified email. Task SignIn(string email, SignInOptions? options = null) Parameters email string options SignInOptions Returns Task SignIn(string, string) Signs in a User. Task SignIn(string email, string password) Parameters email string password string Returns Task SignInAnonymously(SignInAnonymouslyOptions?) Creates a new anonymous user. Task SignInAnonymously(SignInAnonymouslyOptions? options = null) Parameters options SignInAnonymouslyOptions Returns Task A session where the is_anonymous claim in the access token JWT set to true SignInWithIdToken(Provider, string, string?, string?, string?) Allows signing in with an ID token issued by certain supported providers. The [idToken] is verified for validity and a new session is established. This method of signing in only supports [Provider.Google] or [Provider.Apple]. Task SignInWithIdToken(Constants.Provider provider, string idToken, string? accessToken = null, string? nonce = null, string? captchaToken = null) Parameters provider Constants.Provider Provider name or OIDC iss value identifying which provider should be used to verify the provided token. Supported names: google, apple, azure, facebook idToken string 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. accessToken string If the ID token contains an at_hash claim, then the hash of this value is compared to the value in the ID token. nonce string If the ID token contains a nonce claim, then the hash of this value is compared to the value in the ID token. captchaToken string Verification token received when the user completes the captcha on the site. Returns Task Remarks Calling this method will eliminate the current session (if any). SignInWithOtp(SignInWithPasswordlessEmailOptions) Log in a user using magiclink or a one-time password (OTP). If the {{ .ConfirmationURL }} variable is specified in the email template, a magiclink will be sent. If the {{ .Token }} variable is specified in the email template, an OTP will be sent. If you're using phone sign-ins, only an OTP will be sent. You won't be able to send a magiclink for phone sign-ins. Be aware that you may get back an error message that will not distinguish between the cases where the account does not exist or, that the account can only be accessed via social login. Do note that you will need to configure a Whatsapp sender on Twilio if you are using phone sign in with the 'whatsapp' channel. The whatsapp channel is not supported on other providers at this time. Task SignInWithOtp(SignInWithPasswordlessEmailOptions options) Parameters options SignInWithPasswordlessEmailOptions Returns Task Remarks Calling this method will wipe out the current session (if any) SignInWithOtp(SignInWithPasswordlessPhoneOptions) Log in a user using magiclink or a one-time password (OTP). If the {{ .ConfirmationURL }} variable is specified in the email template, a magiclink will be sent. If the {{ .Token }} variable is specified in the email template, an OTP will be sent. If you're using phone sign-ins, only an OTP will be sent. You won't be able to send a magiclink for phone sign-ins. Be aware that you may get back an error message that will not distinguish between the cases where the account does not exist or, that the account can only be accessed via social login. Do note that you will need to configure a Whatsapp sender on Twilio if you are using phone sign in with the 'whatsapp' channel. The whatsapp channel is not supported on other providers at this time. Task SignInWithOtp(SignInWithPasswordlessPhoneOptions options) Parameters options SignInWithPasswordlessPhoneOptions Returns Task Remarks Calling this method will wipe out the current session (if any) SignInWithPassword(string, string) Log in an existing user with an email and password or phone and password. Task SignInWithPassword(string email, string password) Parameters email string password string Returns Task SignOut() Signs out a user and invalidates the current token. Task SignOut() Returns Task SignUp(SignUpType, string, string, SignUpOptions?) Signs up a user Task SignUp(Constants.SignUpType type, string identifier, string password, SignUpOptions? options = null) Parameters type Constants.SignUpType identifier string password string options SignUpOptions Object containing redirectTo and optional user metadata (data) Returns Task Remarks Calling this method will log out the current user session (if any). By default, the user needs to verify their email address before logging in. To turn this off, disable confirm email in your project. Confirm email determines if users need to confirm their email address after signing up. - If Confirm email is enabled, a user is returned but session is null. - If Confirm email is disabled, both a user and a session are returned. When the user confirms their email address, they are redirected to the SITE_URL by default. You can modify your SITE_URL or add additional redirect URLs in your project. If signUp() is called for an existing confirmed user: - If Confirm email is enabled in your project, an obfuscated/fake user object is returned. - If Confirm email is disabled, the error message, User already registered is returned. To fetch the currently logged-in user, refer to User. SignUp(string, string, SignUpOptions?) Signs up a user by email address. Task SignUp(string email, string password, SignUpOptions? options = null) Parameters email string password string options SignUpOptions Object containing redirectTo and optional user metadata (data) Returns Task Remarks By default, the user needs to verify their email address before logging in. To turn this off, disable Confirm email in your project. Confirm email determines if users need to confirm their email address after signing up. - If Confirm email is enabled, a user is returned but session is null. - If Confirm email is disabled, both a user and a session are returned. When the user confirms their email address, they are redirected to the SITE_URL by default. You can modify your SITE_URL or add additional redirect URLs in your project. If signUp() is called for an existing confirmed user: - If Confirm email is enabled in your project, an obfuscated/fake user object is returned. - If Confirm email is disabled, the error message, User already registered is returned. To fetch the currently logged-in user, refer to User . UnlinkIdentity(UserIdentity) Unlinks an identity from a user by deleting it. The user will no longer be able to sign in with that identity once it's unlinked. Task UnlinkIdentity(UserIdentity userIdentity) Parameters userIdentity UserIdentity Identity to be unlinked Returns Task Update(UserAttributes) Updates a User. Task Update(UserAttributes attributes) Parameters attributes UserAttributes Returns Task VerifyOTP(string, string, EmailOtpType) Log in a user give a user supplied OTP received via email. Task VerifyOTP(string email, string token, Constants.EmailOtpType type = EmailOtpType.MagicLink) Parameters email string token string type Constants.EmailOtpType Defaults to MagicLink Returns Task VerifyOTP(string, string, MobileOtpType) Log in a user given a User supplied OTP received via mobile. Task VerifyOTP(string phone, string token, Constants.MobileOtpType type = MobileOtpType.SMS) Parameters phone string The user's phone number. token string Token sent to the user's phone. type Constants.MobileOtpType SMS or phone change Returns Task" }, "api/Supabase.Gotrue.Interfaces.IGotruePersistenceListener-1.html": { "href": "api/Supabase.Gotrue.Interfaces.IGotruePersistenceListener-1.html", diff --git a/xrefmap.yml b/xrefmap.yml index e782b5b..4a20040 100644 --- a/xrefmap.yml +++ b/xrefmap.yml @@ -602,15 +602,15 @@ references: isSpec: "True" fullName: Supabase.Gotrue.Api.SignInWithEmail nameWithType: Api.SignInWithEmail -- uid: Supabase.Gotrue.Api.SignInWithIdToken(Supabase.Gotrue.Constants.Provider,System.String,System.String,System.String) - name: SignInWithIdToken(Provider, string, string?, string?) - href: api/Supabase.Gotrue.Api.html#Supabase_Gotrue_Api_SignInWithIdToken_Supabase_Gotrue_Constants_Provider_System_String_System_String_System_String_ - commentId: M:Supabase.Gotrue.Api.SignInWithIdToken(Supabase.Gotrue.Constants.Provider,System.String,System.String,System.String) - name.vb: SignInWithIdToken(Provider, String, String, String) - fullName: Supabase.Gotrue.Api.SignInWithIdToken(Supabase.Gotrue.Constants.Provider, string, string?, string?) - fullName.vb: Supabase.Gotrue.Api.SignInWithIdToken(Supabase.Gotrue.Constants.Provider, String, String, String) - nameWithType: Api.SignInWithIdToken(Constants.Provider, string, string?, string?) - nameWithType.vb: Api.SignInWithIdToken(Constants.Provider, String, String, String) +- uid: Supabase.Gotrue.Api.SignInWithIdToken(Supabase.Gotrue.Constants.Provider,System.String,System.String,System.String,System.String) + name: SignInWithIdToken(Provider, string, string?, string?, string?) + href: api/Supabase.Gotrue.Api.html#Supabase_Gotrue_Api_SignInWithIdToken_Supabase_Gotrue_Constants_Provider_System_String_System_String_System_String_System_String_ + commentId: M:Supabase.Gotrue.Api.SignInWithIdToken(Supabase.Gotrue.Constants.Provider,System.String,System.String,System.String,System.String) + name.vb: SignInWithIdToken(Provider, String, String, String, String) + fullName: Supabase.Gotrue.Api.SignInWithIdToken(Supabase.Gotrue.Constants.Provider, string, string?, string?, string?) + fullName.vb: Supabase.Gotrue.Api.SignInWithIdToken(Supabase.Gotrue.Constants.Provider, String, String, String, String) + nameWithType: Api.SignInWithIdToken(Constants.Provider, string, string?, string?, string?) + nameWithType.vb: Api.SignInWithIdToken(Constants.Provider, String, String, String, String) - uid: Supabase.Gotrue.Api.SignInWithIdToken* name: SignInWithIdToken href: api/Supabase.Gotrue.Api.html#Supabase_Gotrue_Api_SignInWithIdToken_ @@ -1249,15 +1249,15 @@ references: isSpec: "True" fullName: Supabase.Gotrue.Client.SignInAnonymously nameWithType: Client.SignInAnonymously -- uid: Supabase.Gotrue.Client.SignInWithIdToken(Supabase.Gotrue.Constants.Provider,System.String,System.String,System.String) - name: SignInWithIdToken(Provider, string, string?, string?) - href: api/Supabase.Gotrue.Client.html#Supabase_Gotrue_Client_SignInWithIdToken_Supabase_Gotrue_Constants_Provider_System_String_System_String_System_String_ - commentId: M:Supabase.Gotrue.Client.SignInWithIdToken(Supabase.Gotrue.Constants.Provider,System.String,System.String,System.String) - name.vb: SignInWithIdToken(Provider, String, String, String) - fullName: Supabase.Gotrue.Client.SignInWithIdToken(Supabase.Gotrue.Constants.Provider, string, string?, string?) - fullName.vb: Supabase.Gotrue.Client.SignInWithIdToken(Supabase.Gotrue.Constants.Provider, String, String, String) - nameWithType: Client.SignInWithIdToken(Constants.Provider, string, string?, string?) - nameWithType.vb: Client.SignInWithIdToken(Constants.Provider, String, String, String) +- uid: Supabase.Gotrue.Client.SignInWithIdToken(Supabase.Gotrue.Constants.Provider,System.String,System.String,System.String,System.String) + name: SignInWithIdToken(Provider, string, string?, string?, string?) + href: api/Supabase.Gotrue.Client.html#Supabase_Gotrue_Client_SignInWithIdToken_Supabase_Gotrue_Constants_Provider_System_String_System_String_System_String_System_String_ + commentId: M:Supabase.Gotrue.Client.SignInWithIdToken(Supabase.Gotrue.Constants.Provider,System.String,System.String,System.String,System.String) + name.vb: SignInWithIdToken(Provider, String, String, String, String) + fullName: Supabase.Gotrue.Client.SignInWithIdToken(Supabase.Gotrue.Constants.Provider, string, string?, string?, string?) + fullName.vb: Supabase.Gotrue.Client.SignInWithIdToken(Supabase.Gotrue.Constants.Provider, String, String, String, String) + nameWithType: Client.SignInWithIdToken(Constants.Provider, string, string?, string?, string?) + nameWithType.vb: Client.SignInWithIdToken(Constants.Provider, String, String, String, String) - uid: Supabase.Gotrue.Client.SignInWithIdToken* name: SignInWithIdToken href: api/Supabase.Gotrue.Client.html#Supabase_Gotrue_Client_SignInWithIdToken_ @@ -2903,15 +2903,15 @@ references: fullName.vb: Supabase.Gotrue.Interfaces.IGotrueApi(Of TUser, TSession).SignInWithEmail nameWithType: IGotrueApi.SignInWithEmail nameWithType.vb: IGotrueApi(Of TUser, TSession).SignInWithEmail -- uid: Supabase.Gotrue.Interfaces.IGotrueApi`2.SignInWithIdToken(Supabase.Gotrue.Constants.Provider,System.String,System.String,System.String) - name: SignInWithIdToken(Provider, string, string?, string?) - href: api/Supabase.Gotrue.Interfaces.IGotrueApi-2.html#Supabase_Gotrue_Interfaces_IGotrueApi_2_SignInWithIdToken_Supabase_Gotrue_Constants_Provider_System_String_System_String_System_String_ - commentId: M:Supabase.Gotrue.Interfaces.IGotrueApi`2.SignInWithIdToken(Supabase.Gotrue.Constants.Provider,System.String,System.String,System.String) - name.vb: SignInWithIdToken(Provider, String, String, String) - fullName: Supabase.Gotrue.Interfaces.IGotrueApi.SignInWithIdToken(Supabase.Gotrue.Constants.Provider, string, string?, string?) - fullName.vb: Supabase.Gotrue.Interfaces.IGotrueApi(Of TUser, TSession).SignInWithIdToken(Supabase.Gotrue.Constants.Provider, String, String, String) - nameWithType: IGotrueApi.SignInWithIdToken(Constants.Provider, string, string?, string?) - nameWithType.vb: IGotrueApi(Of TUser, TSession).SignInWithIdToken(Constants.Provider, String, String, String) +- uid: Supabase.Gotrue.Interfaces.IGotrueApi`2.SignInWithIdToken(Supabase.Gotrue.Constants.Provider,System.String,System.String,System.String,System.String) + name: SignInWithIdToken(Provider, string, string?, string?, string?) + href: api/Supabase.Gotrue.Interfaces.IGotrueApi-2.html#Supabase_Gotrue_Interfaces_IGotrueApi_2_SignInWithIdToken_Supabase_Gotrue_Constants_Provider_System_String_System_String_System_String_System_String_ + commentId: M:Supabase.Gotrue.Interfaces.IGotrueApi`2.SignInWithIdToken(Supabase.Gotrue.Constants.Provider,System.String,System.String,System.String,System.String) + name.vb: SignInWithIdToken(Provider, String, String, String, String) + fullName: Supabase.Gotrue.Interfaces.IGotrueApi.SignInWithIdToken(Supabase.Gotrue.Constants.Provider, string, string?, string?, string?) + fullName.vb: Supabase.Gotrue.Interfaces.IGotrueApi(Of TUser, TSession).SignInWithIdToken(Supabase.Gotrue.Constants.Provider, String, String, String, String) + nameWithType: IGotrueApi.SignInWithIdToken(Constants.Provider, string, string?, string?, string?) + nameWithType.vb: IGotrueApi(Of TUser, TSession).SignInWithIdToken(Constants.Provider, String, String, String, String) - uid: Supabase.Gotrue.Interfaces.IGotrueApi`2.SignInWithIdToken* name: SignInWithIdToken href: api/Supabase.Gotrue.Interfaces.IGotrueApi-2.html#Supabase_Gotrue_Interfaces_IGotrueApi_2_SignInWithIdToken_ @@ -3631,15 +3631,15 @@ references: fullName.vb: Supabase.Gotrue.Interfaces.IGotrueClient(Of TUser, TSession).SignInAnonymously nameWithType: IGotrueClient.SignInAnonymously nameWithType.vb: IGotrueClient(Of TUser, TSession).SignInAnonymously -- uid: Supabase.Gotrue.Interfaces.IGotrueClient`2.SignInWithIdToken(Supabase.Gotrue.Constants.Provider,System.String,System.String,System.String) - name: SignInWithIdToken(Provider, string, string?, string?) - href: api/Supabase.Gotrue.Interfaces.IGotrueClient-2.html#Supabase_Gotrue_Interfaces_IGotrueClient_2_SignInWithIdToken_Supabase_Gotrue_Constants_Provider_System_String_System_String_System_String_ - commentId: M:Supabase.Gotrue.Interfaces.IGotrueClient`2.SignInWithIdToken(Supabase.Gotrue.Constants.Provider,System.String,System.String,System.String) - name.vb: SignInWithIdToken(Provider, String, String, String) - fullName: Supabase.Gotrue.Interfaces.IGotrueClient.SignInWithIdToken(Supabase.Gotrue.Constants.Provider, string, string?, string?) - fullName.vb: Supabase.Gotrue.Interfaces.IGotrueClient(Of TUser, TSession).SignInWithIdToken(Supabase.Gotrue.Constants.Provider, String, String, String) - nameWithType: IGotrueClient.SignInWithIdToken(Constants.Provider, string, string?, string?) - nameWithType.vb: IGotrueClient(Of TUser, TSession).SignInWithIdToken(Constants.Provider, String, String, String) +- uid: Supabase.Gotrue.Interfaces.IGotrueClient`2.SignInWithIdToken(Supabase.Gotrue.Constants.Provider,System.String,System.String,System.String,System.String) + name: SignInWithIdToken(Provider, string, string?, string?, string?) + href: api/Supabase.Gotrue.Interfaces.IGotrueClient-2.html#Supabase_Gotrue_Interfaces_IGotrueClient_2_SignInWithIdToken_Supabase_Gotrue_Constants_Provider_System_String_System_String_System_String_System_String_ + commentId: M:Supabase.Gotrue.Interfaces.IGotrueClient`2.SignInWithIdToken(Supabase.Gotrue.Constants.Provider,System.String,System.String,System.String,System.String) + name.vb: SignInWithIdToken(Provider, String, String, String, String) + fullName: Supabase.Gotrue.Interfaces.IGotrueClient.SignInWithIdToken(Supabase.Gotrue.Constants.Provider, string, string?, string?, string?) + fullName.vb: Supabase.Gotrue.Interfaces.IGotrueClient(Of TUser, TSession).SignInWithIdToken(Supabase.Gotrue.Constants.Provider, String, String, String, String) + nameWithType: IGotrueClient.SignInWithIdToken(Constants.Provider, string, string?, string?, string?) + nameWithType.vb: IGotrueClient(Of TUser, TSession).SignInWithIdToken(Constants.Provider, String, String, String, String) - uid: Supabase.Gotrue.Interfaces.IGotrueClient`2.SignInWithIdToken* name: SignInWithIdToken href: api/Supabase.Gotrue.Interfaces.IGotrueClient-2.html#Supabase_Gotrue_Interfaces_IGotrueClient_2_SignInWithIdToken_