payload-authjs
Version:
A Payload CMS 3 plugin for Auth.js 5
23 lines (22 loc) • 714 B
TypeScript
import type { CollectionSlug, DataFromCollectionSlug } from "payload";
interface Options<TSlug extends CollectionSlug> {
/**
* The URL of the server
*
* @default process.env.NEXT_PUBLIC_SERVER_URL
*/
serverUrl?: string;
/**
* The slug of the collection that contains the users
*
* @default "users"
*/
userCollectionSlug?: TSlug;
}
/**
* Get the payload user from the server (only works on the server side)
*
* @deprecated Use `getPayloadSession` instead
*/
export declare const getPayloadUser: <TSlug extends CollectionSlug = "users">({ serverUrl, userCollectionSlug, }?: Options<TSlug>) => Promise<DataFromCollectionSlug<TSlug> | undefined>;
export {};