by mvf4z7 · 4y ago · 0 comments
I prefer session cookies for web applications. Sure you have to worry about CSRF, but that is easily solved with CSRF tokens. Furthermore, is CSRF even really an issue when you are using a JSON API and have CORS properly configured.
We recommend HTTPOnly, secure cookies for storage with an SPA. Diagrams here: https://fusionauth.io/learn/expert-advice/authentication/spa...
If you need to access APIs from elsewhere, run an API proxy server side that can validate the JWT and then forward on the requests.