Reputation: 108
I have multiple Google clouds project like project1, project2, and so on, and a single Firebase project which is linked with one of the cloud project let's say project1.
I want to use the same Firebase project for sign-in/signup for all our projects. When the user is signing successfully and id token passed to the back-end of project1 then this is verified successfully but unable to verify the same id token in another project that project1.
Upvotes: 0
Views: 284
Reputation: 599926
A Firebase project is a Google Cloud project, just with some extra properties set on it. So the answer to the question in your title is "no", there is at most a 1:1 relation between a Cloud project and an Firebase project.
But your use-case sounds quite reasonable. It should be possible to verify ID tokens for multiple projects on a single piece of backend code. The main thing that is important there is that your code uses the correct credentials for each project.
So: check that you are using the correct private key for each project when decoding the ID tokens coming from that project.
Upvotes: 2