How do I prevent my Firebase API Key from being exposed through my google-services.json file?
up vote
0
down vote
favorite
My Android application's google-services.json file is committed with the rest of my project to a public repo. This is a bad idea for the reasons detailed here.
{
"project_info": { ... },
"client": [
{
...,
"api_key": [
{
"current_key": "MY_API_KEY"
}
],
...
}
],
"configuration_version": "1"
}
How can I have the API key get retrieved from a global context during build rather than stored out in the open? An expansion on this approach would be best!
add a comment |
up vote
0
down vote
favorite
My Android application's google-services.json file is committed with the rest of my project to a public repo. This is a bad idea for the reasons detailed here.
{
"project_info": { ... },
"client": [
{
...,
"api_key": [
{
"current_key": "MY_API_KEY"
}
],
...
}
],
"configuration_version": "1"
}
How can I have the API key get retrieved from a global context during build rather than stored out in the open? An expansion on this approach would be best!
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
My Android application's google-services.json file is committed with the rest of my project to a public repo. This is a bad idea for the reasons detailed here.
{
"project_info": { ... },
"client": [
{
...,
"api_key": [
{
"current_key": "MY_API_KEY"
}
],
...
}
],
"configuration_version": "1"
}
How can I have the API key get retrieved from a global context during build rather than stored out in the open? An expansion on this approach would be best!
My Android application's google-services.json file is committed with the rest of my project to a public repo. This is a bad idea for the reasons detailed here.
{
"project_info": { ... },
"client": [
{
...,
"api_key": [
{
"current_key": "MY_API_KEY"
}
],
...
}
],
"configuration_version": "1"
}
How can I have the API key get retrieved from a global context during build rather than stored out in the open? An expansion on this approach would be best!
asked Nov 18 at 3:05
AlleyOOP
5972926
5972926
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53357530%2fhow-do-i-prevent-my-firebase-api-key-from-being-exposed-through-my-google-servic%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown