Issue: Session not retrieved on latest safari version
Description
I'm encountering a session-related issue On modern browsers, specifically the latest version of Safari. While session retrieval
works fine on Chrome
, it fails on Safari.
Context
Backend: Running on Hono (Cloudflare Workers)
Frontend: Hosted on Vercel
Setup: The frontend and backend are on different domain names
Troubleshooting Attempts
I tried setting partitioned: true
and removing secure: true
, but this caused issues across all browsers, making the situation worse.
I'm not sure if this is a bug or if I misconfigured better-auth. Does anyone have insights into why Safari is blocking session retrieval while Chrome works fine? Any suggestions on how to resolve this?6 Replies
Is this happening on dev and prod? Or only on dev? There is an issue with secure cookies and Safari on dev (going from http to https)
It’s on prod
This is my advanced config
your backend and frontend are not on the same domain name ?
I use this for Capacitor
So my native apps are running from localhost
Solution
fixed with :
idk why it wasn't working