getSession gives null after google login on deployed app
Hey everyone, I'm running into an issue with authentication and could use some help.
Tech stack:
Backend: Hono (Deployed on workers)
Frontend: Next.js (Deployed on vercel)
Social Auth: Google OAuth
Issue:
After signing in with Google, the cookie gets set correctly. But the auth cookie doesn't seem to be sent in the request headers when I try to fetch session data using getSession, useSession, or call any other API route.
I even tried making a manual fetch call, but the auth token still isn't included.
I face this only in the deployed/production environment, works flawlessly on the local setup.
Has anyone faced something similar or have suggestions on what might be going wrong?
Tech stack:
Backend: Hono (Deployed on workers)
Frontend: Next.js (Deployed on vercel)
Social Auth: Google OAuth
Issue:
After signing in with Google, the cookie gets set correctly. But the auth cookie doesn't seem to be sent in the request headers when I try to fetch session data using getSession, useSession, or call any other API route.
I even tried making a manual fetch call, but the auth token still isn't included.
I face this only in the deployed/production environment, works flawlessly on the local setup.
Has anyone faced something similar or have suggestions on what might be going wrong?