Session persisting issue on Safari for cross domain
Jun 01, 2020While working on my office project with MERN stack, I stumbled upon a issue where my sessions from react app isn't persisting with my express backend app. And this happened only on safari browser and not on other browsers. The reason behind this is, safari by default disables session handling for cross domains. That is, assume your frontend app is running on
Safari > Preference > Privacy > uncheck the "Prevent cross-site tracking".
After performing the above action, your sessions will work like all other browsers.
Happy Coding!