Is it a good practise to store accessToken client-side?

…衆ロ難τιáo~ 提交于 2019-12-11 09:00:05

问题


For a website that call a backend for each of Data through backend's API

the backend first delivers an accessToken through its authenticate handler, or the accesstoken could also be delivered with OAuth

I was wondering if then it's safe, or a bad practise, to store the accessToken as a simple Javascript var, and only make Ajax calls to the backend

thanks


回答1:


You can do this but make sure the accessToken is short lived. A few hours would be best.



来源:https://stackoverflow.com/questions/10316729/is-it-a-good-practise-to-store-accesstoken-client-side

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!