Module: main
This is the main entry point to the Auth.js library.
Based on the Request and Response Web standard APIs. Primarily used to implement framework-specific packages, but it can also be used directly.
Installation​
- npm
- yarn
- pnpm
npm install @auth/core
yarn add @auth/core
pnpm add @auth/core
Usage​
import { Auth } from "@auth/core"
const request = new Request("https://example.com"
const response = await Auth(request, {...})
console.log(response instanceof Response) // true
Resources​
Functions​
Interfaces​
Classes​
ProvidersRequest​
• ProvidersRequest: Object
Extends the standard Request to add a providers() method on the response
for retrieving a list of client-safe provider configuration. Useful for
rendering a list of sign-in options.
SessionRequest​
• SessionRequest: Object
Extends the standard Request to add a session() method on the response
for retrieving the Session object.