payload-authjs
Version:
A Payload CMS 3 plugin for Auth.js 5
11 lines (10 loc) • 405 B
TypeScript
import type { User as AuthjsUser } from "next-auth";
import type { Field } from "payload";
/**
* Get user attributes from a user object based on the fields
*
* @param user User object
* @param fields Fields to get from the user object
* @returns Object with specified fields from the user object
*/
export declare const getUserAttributes: (user: AuthjsUser, fields: Field[]) => Partial<AuthjsUser>;