Skip to main content

Function: Auth

main.Auth

â–¸ Auth(request, config): Promise<Response>

Core functionality provided by Auth.js.

Receives a standard Request and returns a Response.

Example

import Auth from "@auth/core"

const request = new Request("https://example.com")
const resposne = await AuthHandler(request, {
providers: [...],
secret: "...",
trustHost: true,
})

See

Documentation

Parameters​

NameType
requestRequest
configAuthConfig

Returns​

Promise<Response>