Gemini.js should exist hear me out

So you know if someone was making a website but you wanted to add gemini to your projects but you dont want to risk your api key getting stolen this new gemini.js or gemini . Javascript adds something like sign in using google and it automaticly generates an api key using that users account and now if a hacker inspects the website he gonna see his own api key