Hacker News new | ask | show | jobs
by rexreed 1104 days ago
Question: how are you protecting those API keys? I'm reluctant to enter mine into what could easily be an API Key scraper.
2 comments

The entire thing is frontend only (except for the share feature) so the server never sees your key. You can validate that by watching the network tab in developer console. You can also make a new / revoke an API key to be extra sure.
Please make a new API key folks. There's a lot of tricks to scrape a text box and watching the network tab isn't enough for safety.
Who could scrape the text box in this scenario?
Good luck spotting it if it's attached to the window.onclose event. Chrome extensions could save it to storage. Probably even some chrome vulnerabilities (it would just be a devtools network tab bypass so not technically a 0-day). And that's just top of mind, I'm sure there's other methods.
Chrome extension malware.
Just generate one for this purpose and then revoke it when you're done. You can have more than one key.