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
I tried to export my Next.js app that uses Clerk statically. Right now I'm getting an error that you can only use auth() within the /app directory whenever I export pages. I think this makes sense, since at build time, you wouldn't know who is logged in.
Is there a workaround for this?
If not, can you use Clerk as the auth provider for API routes provided by the Next.js backend and front-end separately?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I tried to export my Next.js app that uses Clerk statically. Right now I'm getting an error that you can only use
auth()
within the/app
directory whenever I export pages. I think this makes sense, since at build time, you wouldn't know who is logged in.Is there a workaround for this?
If not, can you use Clerk as the auth provider for API routes provided by the Next.js backend and front-end separately?
Beta Was this translation helpful? Give feedback.
All reactions