Updates a User.
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
-
+
@@ -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