Multiple Tenancy with 1 Auth Gateway

Hey everyone, I have a question regarding authentication on multiple projects.

Currently we have setup project A for Authentication, and 2 other Apps that are using Firestore, projects B and C. These apps are part of a suite of apps that service different companies.

We’ve enabled GCPIP (Identity Platform) with multi-tenancy and created a tenant with users on project A.

My questions is how do I authenticate the apps B and C to preserve Firestore rules for not allowing a request.auth.uid != null ? B and C don’t have access to the GCIP on project A.

We ideally want to store all users under 1 Identity Platform, and have multiple tenants with users. Is there a way to connect an Identity Platform to multiple projects? I haven’t seen this option yet.

I’ve tried to pass a tenantId to apps B and C and login with a user from project A’s Identity Platform. No success.

It seems to work on Flutter however, I’m not sure why.

We are using Firebase Auth + Identity Platform on project A. Just Firebase on project B and C.

According to this StackOverflow question, you can utilize Identity Platform for various projects as long as they are all part of the same company.

Now, if I understood you correctly, it appears that you want to use projects from various companies. “These apps are part of a suite of apps that service different companies”, so if you want your Firestore rules from App A to apply to users for Apps B and C, it is not possible, according to this StackOverflow.

1 Like