Codementor Events

integrate multi-back-end authentications

Published Mar 15, 2021Last updated Mar 24, 2021

"when u have an app using cookies and can't simply switch to tokens overnight, u have to support both 😃"

JS-SPA-BACKEND-AUTH-TOKENS-STORAGE.jpeg

for XSS & CSRF avoidance -

not store the token in any browser storage at client side
a) use a unique x-csrf token sent as HTTPOnly cookie
or
b) store access token in memory, write refresh token in a secure HTTPOnly cookie to get a new access token as needed.

References :: hasura

Discover and read more posts from Saurabh Sharma
get started
post commentsBe the first to share your opinion
Show more replies