AngularFire 6 - How to set TenantId

679 views
Skip to first unread message

Iain Adams

unread,
Apr 11, 2020, 7:00:33 PM4/11/20
to Firebase Google Group
Hi,

AngularFire 6.0 has now dropped the auth object and moved to Proxy promises. However, the old auth object used to allow me to set the tenantId that I wanted to use for my multi tenant application. How can I set the tenantId with the proxy promises in place?

Thanks
Iain

Kato Richardson

unread,
Apr 13, 2020, 4:04:32 PM4/13/20
to Firebase Google Group
Hi Iain,

Recommending directing this to the issue tracker for AngularFire.

☼, Kato

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/e741b425-8aad-4de0-923a-45d5b6f4483f%40googlegroups.com.


--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Andy Farrell

unread,
Apr 26, 2020, 11:02:38 AM4/26/20
to Firebase Google Group
Hi Iain,

Having the same issue and have searched far and wide for an answer. I agree it's not clear how to set the tenantId in order to use multi-tenant auth.

Did you have any joy with this?

Thanks
Andy

Iain Adams

unread,
Apr 29, 2020, 6:59:59 PM4/29/20
to fireba...@googlegroups.com
Hi Andy,

So sorry for the late reply. I ended up just going native for this specific piece and just using:

firebase.auth().tenantId = tenantId;

This is the best I could get without the support from Google - I raised a feature request for the above - be great if you could too. Hoping there is no issues under the hood (I haven't experienced any yet).

Thanks
Iain
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.

Ewald Dieser

unread,
Feb 28, 2021, 7:56:07 PM2/28/21
to Firebase Google Group
The original question is old but I had this problem today and also had difficulties to find how to correctly set the tenant. I'm using the Identity Platform to realise logins for multiple tenants. I think the correct way to set the tenant is by injecting it. 

import { TENANT_ID } from '@angular/fire/auth';
....
....
providers: [
    { provide: TENANT_ID, useValue: environment.tenantId }
]

Reply all
Reply to author
Forward
0 new messages