Ruyy
Ruyy
KKinde
Created by Ruyy on 12/2/2023 in #💻┃support
Next.js 14.0.3 Middleware TypeError
Subject: Assistance Needed with TypeScript Error in Kind Auth Implementation Hey there! 👋 I hope this message finds you well. I'm currently using Kind Auth for the first time, and I've encountered a TypeScript error while trying to access a protected route. Following the Next.js starter kit, I've set up the protected route at /dashboard. However, every time I attempt to access it, I'm confronted with the following error: Server Error TypeError: Cannot read properties of undefined (reading 'value')
3 |
4 | export default function middleware(req: NextRequest) {
> 5 | return withAuth(req);
| ^
6 | }
7 |
8 | export const config = {
3 |
4 | export default function middleware(req: NextRequest) {
> 5 | return withAuth(req);
| ^
6 | }
7 |
8 | export const config = {
Interestingly, despite this error, the authentication seems to be working fine. The user exists and is successfully populated in the database. I'd greatly appreciate any guidance or assistance you can provide in resolving this issue. Thanks a bunch! 🙏 Github Repo: https://github.com/ruymon/revivi/tree/5ced50b82d94c4c329fde3709701746cf6ea2355
12 replies