Function: getProviders()
function getProviders(options?): Promise<Session[] | null>
Lists OAuth, Email, and custom providers configured in Auth.js at runtime.
Parameters
Parameter | Type | Description |
---|---|---|
options ? | ClientOptions | Overrides for base path, headers, or a custom fetch implementation. |
Returns
Promise
<Session
[] | null
>
A list of available providers or null
if the response is not successful.
Examples
const providers = await getProviders()
const providers = await getProviders({ headers: { cookie: request.headers.get('cookie') ?? '' } })