I do have a problem about understanding crossdomains cookies.
I am currently working on a kind of small micro services architecture app ( I only splitted the front-end and the back-end). So I followed this tutorial :
https://pragmaticstudio.com/tutorials/rails-session-cookies-for-api-authentication.
At first, when reading this tuto, it seemed to be a good idea to opt for cookies based authentication. Everything was working fine on development, but when I push it on production (on 2 differents domain name), thing was not working anymore..
So after a few searches on the internet, I found that modern browser tended to block crossdomain cookies. I found an article on stack overflow which redirected me to this post :
where they advise us to use a special gem. But when I read the gem doc, they said that it would become useless by 2022...
After some more searches, I found that the best way to manage it was probably to use JWT. I read few articles, and they advocate to use cookies set with httponly flag to safely store refresh tokens...
So here is my question: No matter which authentication system I choose, I will still need my back-end to send cookies to my front-end? Or in case of JWT, should my back-end sent refresh tokes as json and then the front-end app saves it as httponly cookies?? Or do I misunderstand something about changes in cookies management?
I know the question may seemed stupid, but more I deep into this topic, more I get confused...
Thanks