Someone mentioned that the recommended way to store JWT tokens is as follows:
access_token
in the application memory (like closures)refresh_token
in cookie entries (HttpOnly)
Currently, my access_token
is stored in localStorage and used for checking authorization status:
isLoggedIn: state => !!state.token
in Vuex
refresh_token
is currently stored in cookies.
I would like to make a change. How can I go about storing access_token in a closure instead?