JEM
JEM
TTCTheo's Typesafe Cult
Created by JEM on 10/16/2023 in #questions
Anyone else getting this error? Clerk: auth() ... looks like you aren't using `authMiddleware`
Error: Clerk: auth() was called but it looks like you aren't using authMiddleware in your middleware file. Please use authMiddleware and make sure your middleware matcher is configured correctly and it matches this route or page. See https://clerk.com/docs/quickstarts/get-started-with-nextjs
import { authMiddleware } from '@clerk/nextjs/server';

// This example protects all routes including api/trpc routes
// Please edit this to allow other routes to be public as needed.
// See https://clerk.com/docs/references/nextjs/auth-middleware for more information about configuring your middleware
export default authMiddleware({
publicRoutes: ['/'],
});

export const config = {
matcher: ['/((?!.+\\.[\\w]+$|_next).*)', '/', '/(api|trpc)(.*)'],
};
import { authMiddleware } from '@clerk/nextjs/server';

// This example protects all routes including api/trpc routes
// Please edit this to allow other routes to be public as needed.
// See https://clerk.com/docs/references/nextjs/auth-middleware for more information about configuring your middleware
export default authMiddleware({
publicRoutes: ['/'],
});

export const config = {
matcher: ['/((?!.+\\.[\\w]+$|_next).*)', '/', '/(api|trpc)(.*)'],
};
nothing too crazy in my middleware, I did add the /server in the import cause I was testing some other solutions ... however clerk and next docs do not explicitly use /server in their middleware.ts
7 replies
TTCTheo's Typesafe Cult
Created by JEM on 4/23/2023 in #questions
Worth paying for more Planetscale databases
I currently have an app I am building longer term that is taking up my 1 free database, I have been wanting another one to have as more of a short term one for building ideas out... is this worth it or do people just jump from free tier to free tier?
6 replies