Clerk middleware complaining on new T3 gallery tutorial

Following https://youtu.be/d5x0JCZbAJs?si=7ucvDfDadGRZ0HBC&t=2799 After getting the .env variables in my local environment and on Vercel, I was able to get Auth to start, let me sign into GitHub, authorize the app, and then fail with the following error when trying to return to the gallery.
Error: Clerk: Unable to verify request, this usually means the Clerk middleware did not run. Ensure Clerk's middleware is properly integrated and matches the current route. For more information, see: https://clerk.com/docs/nextjs/middleware. (code=auth_signature_invalid)
Error: Clerk: Unable to verify request, this usually means the Clerk middleware did not run. Ensure Clerk's middleware is properly integrated and matches the current route. For more information, see: https://clerk.com/docs/nextjs/middleware. (code=auth_signature_invalid)
I tried with Google, too. Each time, I have to clear my cache/cookies. Next: 14.2.2
Theo - t3․gg
YouTube
From 0 to Production - The Modern React Tutorial (RSCs, Next.js, Sh...
The Modern React Tutorial is FINALLY done. This one took awhile. Shoutout to ALL the awesome sponsors who made this possible: - Vercel - Clerk - Posthog - Sentry - Upstash NOTES I MENTION DURING VIDEO "Nextgram": https://github.com/vercel/nextgram/tree/main/app "useUploadThingInputProps": https://gist.github.com/t3dotgg/0464ca78e94acce80ba04ca...
4 Replies
mchisolm0
mchisolm0OP8mo ago
If anyone can verify for me, I'll mark this as resolved. I got it working by reverting Next to 14.2.1. Did I forget/overlook that somewhere?
Fade
Fade8mo ago
I had the same problem yesterday but before I could verify another problem arised, I'll verify once it gets fixed
mchisolm0
mchisolm0OP8mo ago
Sounds good. Just wanted to document in case someone else had the problem.
Fade
Fade8mo ago
Sorry, but I was confused at that time this was not the problem I was facing, I couldn;t verify it In case you face the same problem, The problem for me was 'api/uploadthing' route was protected and it took me a while to figure out how to fix that
export default authMiddleware({
apiRoutes: [],
publicRoutes: ["/api/uploadthing"]
});
export default authMiddleware({
apiRoutes: [],
publicRoutes: ["/api/uploadthing"]
});
I did this in middleware.ts file
Want results from more Discord servers?
Add your server