mirror of
https://github.com/shadcn-ui/taxonomy
synced 2026-05-24 09:48:32 +00:00
Merge 9a3b123e65 into 298a8857c7
This commit is contained in:
commit
5be60a43c2
1 changed files with 1 additions and 2 deletions
|
|
@ -1,10 +1,9 @@
|
|||
import { getToken } from "next-auth/jwt"
|
||||
import { withAuth } from "next-auth/middleware"
|
||||
import { NextResponse } from "next/server"
|
||||
|
||||
export default withAuth(
|
||||
async function middleware(req) {
|
||||
const token = await getToken({ req })
|
||||
const { token } = req.nextauth
|
||||
const isAuth = !!token
|
||||
const isAuthPage =
|
||||
req.nextUrl.pathname.startsWith("/login") ||
|
||||
|
|
|
|||
Loading…
Reference in a new issue