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

actions

auth()

auth(event, config): ReturnType<App.Locals["auth"]>

Parameters

ParameterType
eventRequestEvent<Partial<Record<string, string>>, null | string>
configSvelteKitAuthConfig

Returns

ReturnType<App.Locals["auth"]>


signIn()

signIn(
   provider, 
   options, 
   authorizationParams, 
   config, 
event): Promise<any>

Parameters

ParameterType
providerundefined | BuiltInProviderType | string & {}
optionsundefined | FormData | { redirect: boolean; redirectTo: string; } & Record<string, any>
authorizationParams| undefined | string | Record<string, string> | URLSearchParams | string[][]
configSvelteKitAuthConfig
eventRequestEvent<Partial<Record<string, string>>, null | string>

Returns

Promise<any>


signOut()

signOut(
   options, 
   config, 
event): Promise<any>

Parameters

ParameterType
optionsundefined | { redirect: boolean; redirectTo: string; }
configSvelteKitAuthConfig
eventRequestEvent<Partial<Record<string, string>>, null | string>

Returns

Promise<any>

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