mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
18 lines
432 B
TypeScript
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
|
|
},
|
|
}),
|
|
],
|
|
}) |