next authentication:Next.js框架的身份验证和授权库 源码
下次认证 Next.js的身份验证和授权 next-authentication提供了一组功能和中间件,以在Next.js应用程序中实现身份验证,授权和会话管理。 用法 建立: // Setup // file: lib/auth.js import bcrypt from 'bcrypt' ; import { nextAuth , AuthError } from 'next-authentication' ; import { User } from '../user/model' ; const nextAuthOptions = { cookieName : 'auth