Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Securely store token/password in Chrome extension

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?

like image 488
Keven Wang Avatar asked Oct 02 '22 09:10

Keven Wang


1 Answers

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.

like image 141
Zig Mandel Avatar answered Oct 11 '22 15:10

Zig Mandel