Skip to main content

client

signIn()

Client-side method to initiate a signin flow or send the user to the signin page listing all possible providers. Automatically adds the CSRF token to the request.

Documentation

signIn<P>(providerId?: LiteralUnion<P extends RedirectableProviderType ? BuiltInProviderType | P : BuiltInProviderType, string>, options?: SignInOptions, authorizationParams?: SignInAuthorizationParams): Promise<undefined | Response>

Type parameters

  • P extends undefined | RedirectableProviderType = undefined

Parameters

ParameterType
providerId?LiteralUnion<P extends RedirectableProviderType ? BuiltInProviderType | P : BuiltInProviderType, string>
options?SignInOptions
authorizationParams?SignInAuthorizationParams

Returns

Promise<undefined | Response>


signOut()

Signs the user out, by removing the session cookie. Automatically adds the CSRF token to the request.

Documentation

signOut(options?: SignOutParams<true>): Promise<void>

Parameters

ParameterType
options?SignOutParams<true>

Returns

Promise<void>