,typescript,next.js,next-auth"/>

首页 > 解决方案 > nextjs-auth 授权凭证类型记录

问题描述

如果我使用,我不明白在授权处理程序中使用 Record<never, string>

credentials: {
 email: { type: "text" },
 password: { type: "password" }
},

凭据的类型为 Record<'email', 'password', string>

如果不使用,它们的类型为 Record<never, string>

你能解释一下为什么吗,如果有一种方法可以在没有

上面的代码(没有很难输入凭据)?

标签: typescriptnext.jsnext-auth

解决方案


推荐阅读