I'm using devise_token_auth
for a rails
application with react
on the frontend and rails
as the backend acting as the backend.
In the readme the author states that
If you're building SPA or a mobile app, and you want authentication, you need tokens, not cookies.`
Why? I understand the basic differences between tokens and cookies, but don't understand why you couldn't just use cookies (simply including the headers with any XHR requests)?