Skip to content
Migrating from NextAuth.js v4? Read our migration guide.

client

SignInAuthorizationParams

type SignInAuthorizationParams: string | string[][] | Record<string, string> | URLSearchParams;

Match inputType of new URLSearchParams(inputType)


signIn()

signIn<P>(
   providerId?, 
   options?, 
authorizationParams?): Promise<undefined | Response>

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.

import { signIn } from "@auth/solid-start/client"
signIn()
signIn("provider") // example: signIn("github")

Type parameters

Type parameterValue
P extends undefined | RedirectableProviderTypeundefined

Parameters

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

Returns

Promise<undefined | Response>


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

ParameterType
options?SignOutParams<true>

Returns

Promise<void>

Auth.js © Balázs Orbán and Team - 2024