I’m currently using react as a font end SPA with craft cms as the backend. I’m trying to create user accounts where a user use can sign up and favourite content on the site, using the Like for craft cms plugin - https://github.com/dukt/like
1) User lands on website and the CSRF token is created e.g. pRO1LyYLzxulTZ6ttv17kZ4gBQzTYHeQEpwZI8nL
2) User logs in (updated CSRF token is generated, don’t have access to it unless I refresh the page).
3) User likes an entry (400 error ’The CSRF token could not be verified.’).
4) Refresh the page CSRF Token = pRO1LyYLzxulTZ6ttv17kZ4gBQzTYHeQEpwZI8nL\x7C42101f4b43f2bc331d376d055c77c8f7146d30e4
5) User can now like an entry.
I’ve tried to get the updated CSRF token from the cookie, but I can’t access it via document.cookie for security because they are tagged httponly.
Is there a way to get the updated value of the CSRF token? Possibly after the login action?
Thanks for any help!