You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(nextjs): Simplify logger creation
chore(nextjs): Rename log to debug
So it better conforms to common interfaces used by level-based loggers
fix(nextjs): Split getAuth and auth
In order to throw more targetted error messages
feat(nextjs): Add more logs to authMiddleware
feat(nextjs): Introduce a withLogger wrapper
Copy file name to clipboardExpand all lines: packages/nextjs/src/server/errors.ts
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -31,3 +31,9 @@ export const config = {
31
31
32
32
If you intentionally want to run the authMiddleware for this route, you can exclude it from the default ignoredRoutes.
33
33
`;
34
+
35
+
exportconstgetAuthAuthHeaderMissing=()=>
36
+
'You need to use "withClerkMiddleware" in your Next.js middleware file. You also need to make sure that your middleware matcher is configured correctly and matches this route or page. See https://clerk.com/docs/quickstarts/get-started-with-nextjs';
37
+
38
+
exportconstauthAuthHeaderMissing=()=>
39
+
"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";
'You need to use "withClerkMiddleware" in your Next.js middleware file. You also need to make sure that your middleware matcher is configured correctly and matches this route or page. See https://clerk.com/docs/quickstarts/get-started-with-nextjs',
0 commit comments