nezha_dash/auth.ts
2024-10-21 02:28:39 +08:00

18 lines
432 B
TypeScript

import NextAuth from "next-auth"
import Credentials from "next-auth/providers/credentials"
export const { handlers, signIn, signOut, auth } = NextAuth({
providers: [
Credentials({
credentials: {
password: {},
},
authorize: async (credentials) => {
if (credentials.password === "123456") {
return { id: "1", name: "John Doe" }
}
return null
},
}),
],
})