Skip to main content

Function: signIn()

function signIn(
providerId,
body,
options?): Promise<Response>

Initiates the Auth.js sign-in flow for the provided provider identifier.

Parameters

ParameterTypeDescription
providerIdstringProvider configured in your Auth.js options, such as google or discord.
bodyRecord<string, unknown>Additional payload merged into the sign-in request body; defaults to an empty object.
options?ClientOptionsOverrides for base path, headers, or a custom fetch implementation.

Returns

Promise<Response>

A Response representing the Auth.js /signin endpoint result.

Examples

await signIn('google')
await signIn('email', { email: '[email protected]' }, { basePath: '/custom-auth' })