Table of Contents

Interface IGotrueApi<TUser, TSession>

Namespace
Supabase.Gotrue.Interfaces
Assembly
Supabase.Gotrue.dll
public interface IGotrueApi<TUser, TSession> : IGettableHeaders where TUser : User where TSession : Session

Type Parameters

TUser
TSession
Inherited Members
IGettableHeaders.GetHeaders

Methods

Challenge(string, MfaChallengeParams)

Task<MfaChallengeResponse?> Challenge(string jwt, MfaChallengeParams mfaChallengeParams)

Parameters

jwt string
mfaChallengeParams MfaChallengeParams

Returns

Task<MfaChallengeResponse>

CreateUser(string, AdminUserAttributes?)

Task<TUser?> CreateUser(string jwt, AdminUserAttributes? attributes = null)

Parameters

jwt string
attributes AdminUserAttributes

Returns

Task<TUser>

DeleteFactor(string, MfaAdminDeleteFactorParams)

Task<MfaAdminDeleteFactorResponse?> DeleteFactor(string jwt, MfaAdminDeleteFactorParams deleteFactorParams)

Parameters

jwt string
deleteFactorParams MfaAdminDeleteFactorParams

Returns

Task<MfaAdminDeleteFactorResponse>

DeleteUser(string, string)

Task<BaseResponse> DeleteUser(string uid, string jwt)

Parameters

uid string
jwt string

Returns

Task<BaseResponse>

Enroll(string, MfaEnrollParams)

Task<MfaEnrollResponse?> Enroll(string jwt, MfaEnrollParams mfaEnrollParams)

Parameters

jwt string
mfaEnrollParams MfaEnrollParams

Returns

Task<MfaEnrollResponse>

ExchangeCodeForSession(string, string)

Task<Session?> ExchangeCodeForSession(string codeVerifier, string authCode)

Parameters

codeVerifier string
authCode string

Returns

Task<Session>
Task<BaseResponse> GenerateLink(string jwt, GenerateLinkOptions options)

Parameters

jwt string
options GenerateLinkOptions

Returns

Task<BaseResponse>

GetUriForProvider(Provider, SignInOptions?)

ProviderAuthState GetUriForProvider(Constants.Provider provider, SignInOptions? options = null)

Parameters

provider Constants.Provider
options SignInOptions

Returns

ProviderAuthState

GetUser(string)

Task<TUser?> GetUser(string jwt)

Parameters

jwt string

Returns

Task<TUser>

GetUserById(string, string)

Task<TUser?> GetUserById(string jwt, string userId)

Parameters

jwt string
userId string

Returns

Task<TUser>

InviteUserByEmail(string, string, InviteUserByEmailOptions?)

Task<BaseResponse> InviteUserByEmail(string email, string jwt, InviteUserByEmailOptions? options = null)

Parameters

email string
jwt string
options InviteUserByEmailOptions

Returns

Task<BaseResponse>

LinkIdentity(string, Provider, SignInOptions)

Links an oauth identity to an existing user.

This method requires the PKCE flow.

Task<ProviderAuthState> LinkIdentity(string token, Constants.Provider provider, SignInOptions options)

Parameters

token string

User's token

provider Constants.Provider

Provider to Link

options SignInOptions

Returns

Task<ProviderAuthState>

ListFactors(string, MfaAdminListFactorsParams)

Task<BaseResponse> ListFactors(string jwt, MfaAdminListFactorsParams listFactorsParams)

Parameters

jwt string
listFactorsParams MfaAdminListFactorsParams

Returns

Task<BaseResponse>

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

Task<UserList<TUser>?> 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<UserList<TUser>>

Reauthenticate(string)

Task<BaseResponse> Reauthenticate(string userJwt)

Parameters

userJwt string

Returns

Task<BaseResponse>

RefreshAccessToken(string, string)

Task<TSession?> RefreshAccessToken(string accessToken, string refreshToken)

Parameters

accessToken string
refreshToken string

Returns

Task<TSession>

ResetPasswordForEmail(ResetPasswordForEmailOptions)

Task<ResetPasswordForEmailState> ResetPasswordForEmail(ResetPasswordForEmailOptions options)

Parameters

options ResetPasswordForEmailOptions

Returns

Task<ResetPasswordForEmailState>

ResetPasswordForEmail(string)

Task<BaseResponse> ResetPasswordForEmail(string email)

Parameters

email string

Returns

Task<BaseResponse>

SendMagicLinkEmail(string, SignInOptions?)

Task<BaseResponse> SendMagicLinkEmail(string email, SignInOptions? options = null)

Parameters

email string
options SignInOptions

Returns

Task<BaseResponse>

SendMobileOTP(string)

Task<BaseResponse> SendMobileOTP(string phone)

Parameters

phone string

Returns

Task<BaseResponse>

Settings()

Task<Settings?> Settings()

Returns

Task<Settings>

SignInAnonymously(SignInAnonymouslyOptions?)

Task<TSession?> SignInAnonymously(SignInAnonymouslyOptions? options = null)

Parameters

options SignInAnonymouslyOptions

Returns

Task<TSession>

SignInWithEmail(string, string)

Task<TSession?> SignInWithEmail(string email, string password)

Parameters

email string
password string

Returns

Task<TSession>

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

Task<TSession?> 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<TSession>

SignInWithOtp(SignInWithPasswordlessEmailOptions)

Task<PasswordlessSignInState> SignInWithOtp(SignInWithPasswordlessEmailOptions options)

Parameters

options SignInWithPasswordlessEmailOptions

Returns

Task<PasswordlessSignInState>

SignInWithOtp(SignInWithPasswordlessPhoneOptions)

Task<PasswordlessSignInState> SignInWithOtp(SignInWithPasswordlessPhoneOptions options)

Parameters

options SignInWithPasswordlessPhoneOptions

Returns

Task<PasswordlessSignInState>

SignInWithPhone(string, string)

Task<TSession?> SignInWithPhone(string phone, string password)

Parameters

phone string
password string

Returns

Task<TSession>

SignInWithSSO(Guid, SignInWithSSOOptions?)

Task<SSOResponse?> SignInWithSSO(Guid providerId, SignInWithSSOOptions? options = null)

Parameters

providerId Guid
options SignInWithSSOOptions

Returns

Task<SSOResponse>

SignInWithSSO(string, SignInWithSSOOptions?)

Task<SSOResponse?> SignInWithSSO(string domain, SignInWithSSOOptions? options = null)

Parameters

domain string
options SignInWithSSOOptions

Returns

Task<SSOResponse>

SignOut(string, SignOutScope)

Task<BaseResponse> SignOut(string jwt, Constants.SignOutScope scope = SignOutScope.Global)

Parameters

jwt string
scope Constants.SignOutScope

Returns

Task<BaseResponse>

SignUpWithEmail(string, string, SignUpOptions?)

Task<TSession?> SignUpWithEmail(string email, string password, SignUpOptions? options = null)

Parameters

email string
password string
options SignUpOptions

Returns

Task<TSession>

SignUpWithPhone(string, string, SignUpOptions?)

Task<TSession?> SignUpWithPhone(string phone, string password, SignUpOptions? options = null)

Parameters

phone string
password string
options SignUpOptions

Returns

Task<TSession>

Unenroll(string, MfaUnenrollParams)

Task<MfaUnenrollResponse?> Unenroll(string jwt, MfaUnenrollParams mfaVerifyParams)

Parameters

jwt string
mfaVerifyParams MfaUnenrollParams

Returns

Task<MfaUnenrollResponse>

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<bool> UnlinkIdentity(string token, UserIdentity userIdentity)

Parameters

token string

User's token

userIdentity UserIdentity

Identity to be unlinked

Returns

Task<bool>

UpdateUser(string, UserAttributes)

Task<TUser?> UpdateUser(string jwt, UserAttributes attributes)

Parameters

jwt string
attributes UserAttributes

Returns

Task<TUser>

UpdateUserById(string, string, UserAttributes)

Task<TUser?> UpdateUserById(string jwt, string userId, UserAttributes userData)

Parameters

jwt string
userId string
userData UserAttributes

Returns

Task<TUser>

Verify(string, MfaVerifyParams)

Task<MfaVerifyResponse?> Verify(string jwt, MfaVerifyParams mfaVerifyParams)

Parameters

jwt string
mfaVerifyParams MfaVerifyParams

Returns

Task<MfaVerifyResponse>

VerifyEmailOTP(string, string, EmailOtpType)

Task<TSession?> VerifyEmailOTP(string email, string token, Constants.EmailOtpType type)

Parameters

email string
token string
type Constants.EmailOtpType

Returns

Task<TSession>

VerifyMobileOTP(string, string, MobileOtpType)

Task<TSession?> VerifyMobileOTP(string phone, string token, Constants.MobileOtpType type)

Parameters

phone string
token string
type Constants.MobileOtpType

Returns

Task<TSession>

VerifyTokenHash(string, EmailOtpType)

Task<TSession?> VerifyTokenHash(string tokenHash, Constants.EmailOtpType type)

Parameters

tokenHash string
type Constants.EmailOtpType

Returns

Task<TSession>