Closed oasaleh closed 1 month ago
A simple app with one protected page using middleware does not work
import { withAuth } from "@kinde-oss/kinde-auth-nextjs/middleware"; export default withAuth(async function middleware(req) { console.log("look at me", req.kindeAuth); }); export const config = { matcher: ["/admin"], };
however, when doing this, it works
import { withAuth } from "@kinde-oss/kinde-auth-nextjs/middleware"; export default function middleware(req) { return withAuth(req); } export const config = { matcher: ["/admin"], };
This is the error I'm getting
I don't have any special setup in-place. Just a public page with a <Link> to a protected page.
<Link>
https://github.com/kinde-oss/kinde-auth-nextjs
2.2.4
macOS
14.4.1
No response
Hey, Seems like it can be the same issue happened to me: https://github.com/kinde-oss/kinde-auth-nextjs/issues/151
released 2.2.5-1 which should resolve this issue
Prerequisites
Describe the issue
A simple app with one protected page using middleware does not work
however, when doing this, it works
This is the error I'm getting
I don't have any special setup in-place. Just a public page with a
<Link>
to a protected page.Library URL
https://github.com/kinde-oss/kinde-auth-nextjs
Library version
2.2.4
Operating system(s)
macOS
Operating system version(s)
14.4.1
Further environment details
No response
Reproducible test case URL
No response
Additional information
No response