mirror of
https://litchi.icu/ngc2207/judge.git
synced 2025-05-18 22:46:45 +00:00
feat(auth): add basic Auth.js configuration
This commit is contained in:
parent
b57323938b
commit
a16f5a6e1d
@ -13,6 +13,7 @@
|
||||
"clsx": "^2.1.1",
|
||||
"lucide-react": "^0.469.0",
|
||||
"next": "15.0.3",
|
||||
"next-auth": "^5.0.0-beta.25",
|
||||
"react": "19.0.0-rc-66855b96-20241106",
|
||||
"react-dom": "19.0.0-rc-66855b96-20241106",
|
||||
"tailwind-merge": "^2.6.0",
|
||||
|
2
src/app/api/auth/[...nextauth]/route.ts
Normal file
2
src/app/api/auth/[...nextauth]/route.ts
Normal file
@ -0,0 +1,2 @@
|
||||
import { handlers } from "@/auth";
|
||||
export const { GET, POST } = handlers;
|
5
src/auth.ts
Normal file
5
src/auth.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import NextAuth from "next-auth";
|
||||
|
||||
export const { handlers, signIn, signOut, auth } = NextAuth({
|
||||
providers: [],
|
||||
});
|
1
src/middleware.ts
Normal file
1
src/middleware.ts
Normal file
@ -0,0 +1 @@
|
||||
export { auth as middleware } from "@/auth";
|
Loading…
Reference in New Issue
Block a user