-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Hey @vstarush — What domain(s) are you using for your Payload API and your frontend website API? It looks like you are specifying Also, another thing to check into would be how browsers have started to handle third-party cookies. By default, third-party cookies are now rejected across the board - which means that if you have your API and your website running on separate domains, you won't be able to use the cookie as you're intending to. I'm not yet sure that this is the issue you're experiencing though. First, I'd check the Let me know what URLs you're using for your Payload API and your frontend site and we can go from there! |
Beta Was this translation helpful? Give feedback.
-
What solved the problem for me is putting the front end and backend under same domain. For example: Frontend: https://domain.com The problem is, as @jmikrut mentioned, with the third-party cookies, browsers now do not allow to set them from a different domain. But if the frontend and backend is under one domain, all works fine. |
Beta Was this translation helpful? Give feedback.
Hey @vstarush —
What domain(s) are you using for your Payload API and your frontend website API?
It looks like you are specifying
Secure
on your cookie, but using an insecure domain (http://localhost:3000
). This may cause the cookie rejection.Also, another thing to check into would be how browsers have started to handle third-party cookies. By default, third-party cookies are now rejected across the board - which means that if you have your API and your website running on separate domains, you won't be able to use the cookie as you're intending to. I'm not yet sure that this is the issue you're experiencing though.
First, I'd check the
Secure
setting. Maybe only enableSecure
in producti…