Search code examples
androidgoogle-mapsfirebasefirebase-notificationsfirebase-console

Why debug key works in Firebase but not in Google Maps?


It has been the first time I uploaded an app with Google Maps to the Play Store, so I made the mistake of not adding a release SHA1 key to the Google Dev Console. The map was not working until I changed the SHA1 key to a release one.

I'm also using Firebase Notifications and I haven't added a release SHA1 key into the Firebase console, but the notifications are still working, why?

Should I leave that key and that's all? Or should I add the release SHA1 key also to the Firebase console, download the new generated google-services.json and then update the app in Google Play?


Solution

  • The SHA1 is not a mandatory requirement when using Firebase in your app, however, it is required when you need to (as per the helper seen in the Firebase Console):

    Used to create an OAuth 2 client and API key for your app.

    Where the OAuth 2 Client is used for authentication and authorization so that you can use some Google APIs.

    However, if you're only going to use FCM/Notifications, there is no such need for it.