Skip to main content

auth-client

Documentation / lib/auth-client

authClient​

const authClient: object & object & object & object & object & object & object & object & object & object & object & object & object & object & object & object & object & object & object & object & object & object & object & object & object & object & object & object & object & object;

Defined in: apps/web/src/lib/auth-client.ts:13

Create Better Auth Client with One Tap​

Note: If browser blocks due to closing with "FedCM get() rejects with NetworkError" then click lockicon in url bar and allow "Third Party Sign In" or clear cookies and allow localhost in chrome://settings/content/federatedIdentityApi

Type declaration​

NameTypeDefined in

signIn

{ social: <FetchOptions>(...data: [Prettify<object & object>, FetchOptions?]) => Promise<BetterFetchResponse<NonNullable< | { } | { }>, { }, FetchOptions["throw"] extends true ? true : false>>; }

Type declaration​

NameTypeDefined in

getSession()

<FetchOptions>(...data: [Prettify<undefined>?, FetchOptions?]) => Promise<BetterFetchResponse<{ }, { }, FetchOptions["throw"] extends true ? true : false>>

Type declaration​

NameTypeDefined in

signOut()

<FetchOptions>(...data: [Prettify<undefined>?, FetchOptions?]) => Promise<BetterFetchResponse<{ }, { }, FetchOptions["throw"] extends true ? true : false>>

Type declaration​

NameTypeDefined in

signIn

{ email: <FetchOptions>(...data: [Prettify<object & object>, FetchOptions?]) => Promise<BetterFetchResponse<{ }, { }, FetchOptions["throw"] extends true ? true : false>>; }

Type declaration​

NameTypeDefined in

forgetPassword()

<FetchOptions>(...data: [Prettify<object & object>, FetchOptions?]) => Promise<BetterFetchResponse<{ }, { }, FetchOptions["throw"] extends true ? true : false>>

Type declaration​

NameTypeDefined in

resetPassword()

<FetchOptions>(...data: [Prettify<object & object>, FetchOptions?]) => Promise<BetterFetchResponse<{ }, { }, FetchOptions["throw"] extends true ? true : false>>

Type declaration​

NameTypeDefined in

verifyEmail()

<FetchOptions>(...data: [Prettify<undefined>?, FetchOptions?]) => Promise<BetterFetchResponse<NonNullable< | void | { } | { }>, { }, FetchOptions["throw"] extends true ? true : false>>

Type declaration​

NameTypeDefined in

sendVerificationEmail()

<FetchOptions>(...data: [Prettify<object & object>, FetchOptions?]) => Promise<BetterFetchResponse<{ }, { }, FetchOptions["throw"] extends true ? true : false>>

Type declaration​

NameTypeDefined in

changeEmail()

<FetchOptions>(...data: [Prettify<object & object>, FetchOptions?]) => Promise<BetterFetchResponse<{ }, { }, FetchOptions["throw"] extends true ? true : false>>

Type declaration​

NameTypeDefined in

changePassword()

<FetchOptions>(...data: [Prettify<object & object>, FetchOptions?]) => Promise<BetterFetchResponse<{ }, { }, FetchOptions["throw"] extends true ? true : false>>

Type declaration​

NameTypeDefined in

deleteUser()

<FetchOptions>(...data: [Prettify<object & object>?, FetchOptions?]) => Promise<BetterFetchResponse<{ }, { }, FetchOptions["throw"] extends true ? true : false>>

Type declaration​

NameTypeDefined in

resetPassword

{ :token: <FetchOptions>(...data: [Prettify<undefined>?, FetchOptions?]) => Promise<BetterFetchResponse<never, { }, FetchOptions["throw"] extends true ? true : false>>; }

Type declaration​

NameTypeDefined in

requestPasswordReset()

<FetchOptions>(...data: [Prettify<object & object>, FetchOptions?]) => Promise<BetterFetchResponse<{ }, { }, FetchOptions["throw"] extends true ? true : false>>

Type declaration​

NameTypeDefined in

resetPassword

{ :token: <FetchOptions>(...data: [Prettify<undefined>?, FetchOptions?]) => Promise<BetterFetchResponse<never, { }, FetchOptions["throw"] extends true ? true : false>>; }

Type declaration​

NameTypeDefined in

revokeSession()

<FetchOptions>(...data: [Prettify<object & object>, FetchOptions?]) => Promise<BetterFetchResponse<{ }, { }, FetchOptions["throw"] extends true ? true : false>>

Type declaration​

NameTypeDefined in

revokeSessions()

<FetchOptions>(...data: [Prettify<undefined>?, FetchOptions?]) => Promise<BetterFetchResponse<{ }, { }, FetchOptions["throw"] extends true ? true : false>>

Type declaration​

NameTypeDefined in

revokeOtherSessions()

<FetchOptions>(...data: [Prettify<undefined>?, FetchOptions?]) => Promise<BetterFetchResponse<{ }, { }, FetchOptions["throw"] extends true ? true : false>>

Type declaration​

NameTypeDefined in

linkSocial()

<FetchOptions>(...data: [Prettify<object & object>, FetchOptions?]) => Promise<BetterFetchResponse<{ }, { }, FetchOptions["throw"] extends true ? true : false>>

Type declaration​

NameTypeDefined in

listAccounts()

<FetchOptions>(...data: [Prettify<undefined>?, FetchOptions?]) => Promise<BetterFetchResponse<object[], { }, FetchOptions["throw"] extends true ? true : false>>

Type declaration​

NameTypeDefined in

deleteUser

{ callback: <FetchOptions>(...data: [Prettify<undefined>?, FetchOptions?]) => Promise<BetterFetchResponse<{ }, { }, FetchOptions["throw"] extends true ? true : false>>; }

Type declaration​

NameTypeDefined in

unlinkAccount()

<FetchOptions>(...data: [Prettify<object & object>, FetchOptions?]) => Promise<BetterFetchResponse<{ }, { }, FetchOptions["throw"] extends true ? true : false>>

Type declaration​

NameTypeDefined in

refreshToken()

<FetchOptions>(...data: [Prettify<object & object>, FetchOptions?]) => Promise<BetterFetchResponse<OAuth2Tokens, { }, FetchOptions["throw"] extends true ? true : false>>

Type declaration​

NameTypeDefined in

getAccessToken()

<FetchOptions>(...data: [Prettify<object & object>, FetchOptions?]) => Promise<BetterFetchResponse<{ }, { }, FetchOptions["throw"] extends true ? true : false>>

Type declaration​

NameTypeDefined in

accountInfo()

<FetchOptions>(...data: [Prettify<object & object>, FetchOptions?]) => Promise<BetterFetchResponse<{ }, { }, FetchOptions["throw"] extends true ? true : false>>

Type declaration​

NameTypeDefined in

signUp

{ email: <FetchOptions>(...data: [Prettify<{ }>, FetchOptions?]) => Promise<BetterFetchResponse<NonNullable< | { } | { }>, { }, FetchOptions["throw"] extends true ? true : false>>; }

Type declaration​

NameTypeDefined in

updateUser()

<FetchOptions>(...data: [Prettify<InferUserUpdateCtx<{ baseURL: string; plugins: object[]; }, FetchOptions>>?, FetchOptions?]) => Promise<BetterFetchResponse<{ }, { }, FetchOptions["throw"] extends true ? true : false>>

Type declaration​

NameTypeDefined in

listSessions()

<FetchOptions>(...data: [Prettify<undefined>?, FetchOptions?]) => Promise<BetterFetchResponse<Prettify<{ }>[], { }, FetchOptions["throw"] extends true ? true : false>>