我将 next-auth 与自定义提供程序和 Prisma 适配器一起使用,我只想存储值:id、名称、国家/地区、头像和性别。但是,我收到此错误:
\n[next-auth][error][adapter_error_createUser] \nhttps://next-auth.js.org/errors#adapter_error_createuser\nInvalid `p.user.create()` invocation in\n.\\node_modules\\@next-auth\\prisma-adapter\\dist\\index.js:6:38\n\n 3 exports.PrismaAdapter = void 0;\n 4 function PrismaAdapter(p) {\n 5 return {\n\xe2\x86\x92 6 createUser: (data) => p.user.create({\n data: {\n name: [redacted],\n wcaId: [redacted],\n country: [redacted],\n avatar: [redacted],\n gender: [redacted],\n email: undefined,\n emailVerified: null\n ~~~~~~~~~~~~~\n }\n })\n\nUnknown arg `emailVerified` in data.emailVerified for type UserCreateInput. Available args:\n...\nRun Code Online (Sandbox Code Playgroud)\n我的自定义提供程序中的配置文件对象如下所示:
\nprofile(profile) {\n return {\n id: profile.me.id,\n name: profile.me.name,\n country: profile.me.country_iso2,\n avatar: profile.me.avatar.url,\n gender: profile.me.gender,\n };\n },\nRun Code Online (Sandbox Code Playgroud)\n我的 Prisma 模式中的所有内容都遵循https://next-auth.js.org/adapters/prisma#setup中的示例,但用户模型除外,如下所示: …