Skip to main content

Module: index

Installation​

npm install @auth/core

Usage​

Functions​

AuthHandler​

β–Έ AuthHandler(request, options): Promise<Response>

The core functionality of Auth.js. It receives a standard Request and returns a standard Response.

Parameters​

NameType
requestRequest
optionsAuthOptions

Returns​

Promise<Response>

Type Aliases​

TokenSet​

Ζ¬ TokenSet: Partial<OAuth2TokenEndpointResponse | OpenIDTokenEndpointResponse>

Different tokens returned by OAuth Providers. Some of them are available with different casing, but they refer to the same value.

Interfaces​

Account​

β€’ Account: Object

Usually contains information about the provider being used and also extends TokenSet, which is different tokens returned by OAuth Providers.


AuthOptions​

β€’ AuthOptions: Object

Configure your NextAuth instance

Documentation


CallbacksOptions​

β€’ CallbacksOptions<P, A>: Object

Documentation

Type parameters​

NameType
PProfile
AAccount

CookieOption​

β€’ CookieOption: Object

Documentation


CookiesOptions​

β€’ CookiesOptions: Object

Documentation


EventCallbacks​

β€’ EventCallbacks: Object

The various event callbacks you can register for from next-auth

Documentation


LoggerInstance​

β€’ LoggerInstance: Object

Override any of the methods, and the rest will use the default logger.

Documentation


PagesOptions​

β€’ PagesOptions: Object

Documentation


Profile​

β€’ Profile: Object

The OAuth profile returned from your provider


Session​

β€’ Session: Object

Returned by useSession, getSession, returned by the session callback and also the shape received as a prop on the SessionProvider React Context

useSession | getSession | SessionProvider | session callback


SessionOptions​

β€’ SessionOptions: Object

Documentation


Theme​

β€’ Theme: Object

Change the theme of the built-in pages.

Documentation | Pages


User​

β€’ User: Object

The shape of the returned object in the OAuth providers' profile callback, available in the jwt and session callbacks, or the second parameter of the session callback, when using a database.

signIn callback | session callback | jwt callback | profile OAuth provider callback