Skip to content
Migrating from NextAuth.js v4? Read our migration guide.
API reference
http-api-adapters

lib/http-api-adapters

encodeUrlEncoded()

encodeUrlEncoded(object): string

Encodes an object as url-encoded string.

Parameters

ParameterType
objectRecord<string, any>

Returns

string


toFastifyReply()

toFastifyReply(response, reply): Promise<string>

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

Parameters

ParameterType
responseResponse
replyFastifyReply<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, RouteGenericInterface, unknown, FastifySchema, FastifyTypeProviderDefault, unknown>

Returns

Promise<string>


toWebRequest()

toWebRequest(req): Request

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

Parameters

ParameterType
reqFastifyRequest<RouteGenericInterface, RawServerDefault, IncomingMessage, FastifySchema, FastifyTypeProviderDefault, unknown, FastifyBaseLogger, ResolveFastifyRequestType<FastifyTypeProviderDefault, FastifySchema, RouteGenericInterface>>

Returns

Request

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