Safe Storage Of API Key #2039
-
I can't seem to find much information about this topic specifically regarding this module. However, I figured I'd ask those more experienced than I am... I'm going to go out on a limb and say that having this code:
Is not the safest method and could lead to the key being easily stolen and used by an unintended third party. Obviously, you wouldn't want to upload your API key to GitHub. But my question comes from me assuming even having it on the frontend like this is a no go as well. Perhaps I am wrong? If my assumption is correct, is there a better way to handle loading the Maps API that is more secure and less likely to result in a stolen API key? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Well, even if you hide the key to env variable, it will be some string value in js. The main security approach is limiting the domain name and services |
Beta Was this translation helpful? Give feedback.
Well, even if you hide the key to env variable, it will be some string value in js. The main security approach is limiting the domain name and services