最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Securely store tokenpassword in Chrome extension - Stack Overflow

programmeradmin4浏览0评论

I'm implementing a Chrome extension, which needs to access a 3rd party API endpoint using a token.

How do I store a token securely in the Chrome extension, assuming other Chrome extension scripts can access the page's localStorage & cookie?

I'm implementing a Chrome extension, which needs to access a 3rd party API endpoint using a token.

How do I store a token securely in the Chrome extension, assuming other Chrome extension scripts can access the page's localStorage & cookie?

Share Improve this question edited Mar 17, 2014 at 18:18 Keven Wang asked Mar 7, 2014 at 1:11 Keven WangKeven Wang 1,2781 gold badge19 silver badges30 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 6

Other scripts cannot access your storage. But a user can always debug your script and see it. You wont be able to encrypt it. At most you can obfuscate it.

I too don't see how it could be done. The only ways seem to be either calling your server and have server do the request that involves using the API key or obfuscate it for example by converting to base64 string in code but even then it'll be visible in developer tools network tab

发布评论

评论列表(0)

  1. 暂无评论