Skip to content
Migrating from NextAuth.js v4? Read our migration guide.

lib/http-api-adapters

encodeUrlEncoded()

encodeUrlEncoded(object): string

Encodes an object as url-encoded string.

Parameters

ParameterType
objectRecord<string, any>

Returns

string


toExpressResponse()

toExpressResponse(response, res): Promise<void>

Adapts a Web Response to an Express Response, invoking appropriate Express response methods to handle the response.

Parameters

ParameterType
responseResponse
resResponse<any, Record<string, any>>

Returns

Promise<void>


toWebRequest()

toWebRequest(req): Request

Adapts an Express Request to a Web Request, returning the Web Request.

Parameters

ParameterType
reqRequest<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

Returns

Request

Auth.js © Balázs Orbán and Team - 2024