When you’re sharing a repository and don’t want the person to have access to the key of some API, what’s the best way to hide?
2
In a version control repository (Git for example)? If so, it’s best that you don’t upload that file and add it to the list of ignored Git files (https://git-scm.com/docs/gitignore).
If you are SHARING I see no reason to want to hide, but if you want I would follow the @vmartins tip about gitgnore but it would give error in your code since you will be using the API key at runtime. I think this goes from the common sense of the team of developers of this project, if the other devs will not be able to have access just don’t share or each have their own key API
In a version control repository (Git for example)? If so, it’s best that you don’t upload that file and add it to the list of ignored Git files (https://git-scm.com/docs/gitignore).
– vmartins
Exactly.. But what if key is used inside the code?
– Mateus Carvalho
If you are SHARING I see no reason to want to hide, but if you want I would follow the @vmartins tip about gitgnore but it would give error in your code since you will be using the API key at runtime. I think this goes from the common sense of the team of developers of this project, if the other devs will not be able to have access just don’t share or each have their own key API
– Alessandro Barreto