DEV Community

Discussion on: From Cookie strings into usable JavaScript

Collapse
 
asg5704 profile image
Alexander Garcia

Sure. On our project we have multiple cookies being set for OAuth with most of them being httpOnly cookies (meaning they aren't accessible to JavaScript). We decided to store the token's expiration in a cookie available in JavaScript so that we could reduce the number of network requests and only call a silent refresh request when needed.