client
SignInResponse
Properties
code
code: undefined | string;
error
error: undefined | string;
ok
ok: boolean;
status
status: number;
url
url: null | string;
SignInAuthorizationParams
type SignInAuthorizationParams: string | string[][] | Record<string, string> | URLSearchParams;
Match inputType
of new URLSearchParams(inputType)
signIn()
signIn(provider, options, authorizationParams)
signIn(
provider?,
options?,
authorizationParams?): Promise<void>
Initiates a signin flow or sends the user to the signin page listing all possible providers. Handles CSRF protection.
Parameters
Parameter | Type |
---|---|
provider ? | ProviderId |
options ? | SignInOptions <true > |
authorizationParams ? | SignInAuthorizationParams |
Returns
Promise
<void
>
Note
This method can only be used from Client Components (“use client” or Pages Router).
For Server Actions, use the signIn
method imported from the auth
config.
signIn(provider, options, authorizationParams)
signIn(
provider?,
options?,
authorizationParams?): Promise<SignInResponse>
Parameters
Parameter | Type |
---|---|
provider ? | ProviderId |
options ? | SignInOptions <false > |
authorizationParams ? | SignInAuthorizationParams |
Returns
signOut()
signOut(options?): Promise<void>
Signs the user out, by removing the session cookie. Automatically adds the CSRF token to the request.
import { signOut } from "@auth/solid-start/client"
signOut()
Parameters
Parameter | Type |
---|---|
options ? | SignOutParams <true > |
Returns
Promise
<void
>