Reputation: 1555
I have a very specific set up, where we have one project that is handling our Auth, but another project where the actual Android/iOS applications are actually added to the project. When using auth for our custom backend, that's fine, but when we try to use our own provider, we get an error back with
There was an error while trying to get your package certificate hash.
Is there a way to keep the projects added on the mobile project, and still validate authentication through another firebase project?
Upvotes: 2
Views: 5890
Reputation: 177
That error could also be related to the signing of the application, the sha hash has to be added to firebase console, check out this link: https://developers.google.com/android/guides/client-auth#using_keytool_on_the_certificate
for debug purpose you have to follow this section from the above link:
and add the fingerprint your project settings -> your apps section of your firebase console.
Upvotes: 0
Reputation: 1555
Frank's answer is correct, however in my app that was already taken care of. I've resolved the issue so will leave the question up. In my particular case, I had the SHA fingerprint added on the wrong project (the one that didn't include the Invite/Auth). Since the SHA Fingerprint is only required for Invite/Auth, and can only be set in one Firebase project, it must be set on the Firebase Project that you are using for Auth/Invite. This doesn't seem to be the case for iOS, and the documentation could be clearer for this.
Upvotes: 2
Reputation: 599876
You can include multiple Firebase projects in to a single app, by initializing a separate FirebaseApp
instance for each project. See the documentation on configuring multiple projects and for example How to connect to more than one firebase database from an android App.
Upvotes: 1