passport / discuss

A forum for discussing topics related to the usage of Passport.js.
1 stars 0 forks source link

Authentication Issues on Safari/Chrome/Opera & potentially more #48

Closed harman-brar closed 3 years ago

harman-brar commented 3 years ago

Hello, I've been using essentially the exact same implementation as the one seen at http://www.passportjs.org/docs/authenticate/ for my site for some time now. Recently it has started to fail to authenticate users on Safari, Chrome, and Opera... I assume other Chromium-based browsers are affected as well. Signing in is working fine on Firefox, Samsung Internet and facebook's built in browser.

Using the problematic browsers, req is undefined after calling passport.authenticate('local').

harman-brar commented 3 years ago

Chrome is now labelling cross origin cookies as 3rd-party and not allowing them to be set. If you're using a hosting provider such as heroku, setup a custom domain that is at the same root domain as your frontend -- the issue is resolved.