#NextAuth Shared between Microfrontends
1 messages · Page 1 of 1 (latest)
Hi @fickle sluice. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Based on the information provided in the extracts, sharing NextAuth session data between two Next.js apps on different ports (localhost:3000 and localhost:4000) without using JWT secret is not directly addressed. However, there are some related points that might be helpful.
In one of the Github issues (https://github.com/vercel/next.js/issues/49002), a user describes a similar situation where they are trying to share user session data across different subdomains of their application. They mention that they've wrapped their whole app with a Providers component but still couldn't share the session data.
Another Github issue (https://github.com/vercel/next.js/issues/50160) suggests that server-side authentication issues might be better addressed in the NextAuth.js repository, and points to the getServerSession configuration in NextAuth.js for server-side authentication.
In a Vercel guide (https://vercel.com/guides/nextjs-multi-tenant-application), it's mentioned that if you're using Google as an OAuth provider, you might run into an issue where Google does not allow you to add localhost subdomains as an Authorized redirect URI. The suggested workaround is to use a different localhost port.