Packages@robojs/auth
signIn()
Function: signIn()
Call Signature
function signIn(
providerId,
body?,
options?): Promise<Response>Initiates the Auth.js sign-in flow for the provided provider identifier.
Parameters
| Parameter | Type | Description |
|---|---|---|
providerId | string | Provider configured in your Auth.js options, such as google or discord. |
body? | Record<string, unknown> | Additional payload merged into the sign-in request body; defaults to an empty object. |
options? | ClientOptions | Overrides 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: 'user@example.com' }, { basePath: '/custom-auth' })Call Signature
function signIn(
providerId,
options?,
proxy?,
redirect?): Promise<SignInFetchResult | SignInManualResult | SignInRedirectedResult>Initiates the Auth.js sign-in flow for the provided provider identifier.
Parameters
| Parameter | Type | Description |
|---|---|---|
providerId | string | Provider configured in your Auth.js options, such as google or discord. |
options? | Record<string, unknown> & { callbackUrl: string; csrfToken: string; } | Overrides for base path, headers, or a custom fetch implementation. |
proxy? | ClientOptions | - |
redirect? | RedirectMode | - |
Returns
Promise<SignInFetchResult | SignInManualResult | SignInRedirectedResult>
A Response representing the Auth.js /signin endpoint result.
Examples
await signIn('google')await signIn('email', { email: 'user@example.com' }, { basePath: '/custom-auth' })