Server Error
TypeError: createContext only works in Client Components. Add the "use client" directive at the top of the file to use it. Read more: https://nextjs.org/docs/messages/context-in-server-component
This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack
createContext
node_modules/.pnpm/supertokens-auth-react@0.33.1_react-dom@18.2.0_react@18.2.0_supertokens-web-js@0.6.0/node_modules/supertokens-auth-react/lib/build/userContextWrapper.js (13:48)
(sc_server)/./node_modules/.pnpm/supertokens-auth-react@0.33.1_react-dom@18.2.0_react@18.2.0_supertokens-web-js@0.6.0/node_modules/supertokens-auth-react/lib/build/userContextWrapper.js
I'm using NextJS App router, Do we have support of NextJS App router?
r
rp_st
07/07/2023, 6:59 AM
hey @cjsingg not yet. We only support pages dir at the moment. But we are working on adding support for app dir
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).