Reputation: 867
I use Firebase for many features and one of them is the Google sign-in. About a year ago I created an App assigned the SHA1 to it and downloaded the json file. All worked great until last week I had to add another app to the same project in Firebase and redownloaded the json file. For some reason the R.string.default_web_client_id is not exist. The reason for it is the new json file does not contain the web type auth client in its clients list. I can copy the client ID to the strings.xml but it should be generated automatically.
Upvotes: 6
Views: 6022
Reputation: 15936
I had that issue and what I found is that:
When you create the firebase project it creates a web OAuth client in console.developer.google.com, which's the one that is included in the google-services.json
of each android app you create in that project.
If you had deleted that manually, then to restore it you need to add a web app in firebase and then it will recreate that web OAuth client, and then the google-services.json
will contain that.
I hope these two findings helps you
Upvotes: 3