[firebase_auth] Multi tenancy ( Identity Platform compatibility ) #5561
Replies: 23 comments
|
Hi guys! Any news about it? 🙏 |
Please! 🙏🙏🙏🙏🙏 |
|
@darioielardi FYI and anyone interested. I discovered a workaround solution to make it work 😬 I move the authentication (login + password) to backend using custom token and return this token to my mobile apps using it as custom token authentication. After that, using the last version of the firebase_auth I can authenticate multi-tenancy on my mobile apps 🎉 |
|
@ddomingues thanks for letting us know! |
|
@daikini of course. We use cloud functions in nodeJS. My authentication flow now has 2 steps, unfortunatelly:
If it works successfully I return this token as result of the request and authenticate the user with the custom token using the firebase_auth : I don't think it a great solution, but until the implementation at firebase_auth to be delivered, it works 🤷♂ |
|
@ddomingues thank you very much for the explanation, I'm wondering if the rate limit applies for sign in operations. |
|
link |
Unfortunately, this workaround is not complete, you will lose almost all the metadata, and the token won't contain tenantId. Therefore, if you use TenantAwareAuth in your backend, it will reject these tokens. |
|
@2ZeroSix ... as you noted the API support is already there. Can you think of or point us to a reasonable work-around for flutter-web? This is a very important security consideration for us as we definitely want the tenantId on the user to secure our firebase/storage rules. |
|
@ajbarry you can try to emulate TenatAwareAuth behavior using claims and custom tokens. In this case if you want to let user use same credentials (email/phone/third party) for different accounts in your system (one per tenant): Else you don’t need tenants and can just use claims for restriction policies |
|
Hi is there any update on this? Would be fantastic to be able to run a setTenant method like one can in other firebase language libraries without using the cloud function method described above? |
|
Yep, same question here. Any updates on this? |
|
Looks like android has it supported now https://firebase.google.com/support/release-notes/android#auth_v19-4-0 |
|
is tenancy login supported? |
Seems like getting a tenent Id of a user is supported but setting a tenent Id for an auth instance is not yet supported or am I missing something here? |
|
Yes I think you are right. I can try to add this to the sdk but could
welcome any pointers to where to add the set tenant id code.
…On Sun, Dec 20, 2020, 9:36 AM JonasJW ***@***.***> wrote:
i saw
https://github.com/FirebaseExtended/flutterfire/blob/master/packages/firebase_auth/firebase_auth/CHANGELOG.md#0183
is tenancy login supported?
Seems like getting a tenent Id of a user is supported but setting a tenent
Id for an auth instance is not yet supported or am I missing something here?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1584 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAB6KAMQZ4MBTXQOB4OHB3SVYYZLANCNFSM4JYLSHHA>
.
|
|
Hey all, started looking into this. PR #4465 basically adds support for the following: On native, this variable is passed over to native with each method channel request and on web, it's set directly on the underlying web SDK via class overrides. Still needs iOS work and tests. |
|
Does anyone have a rough idea of the time schedule to get these features into production? I need this feature, but I'll have to make a call on using a bridge and calling native SDKs or waiting for the feature. |
|
Hi all, any updates on this? |
|
@kmr299 I made a bridge to native. One caveat is that with the current SDK, you can't unset a tenant ID once you've set it. I had to maintain a keyed dictionary of app instances, each of which corresponds to a tenant ID, or to no tenant ID. |
|
Thanks @SpiegelSoft Could you give an example of your implementation? |
|
Any news on this? Does anyone have any working workarounds? |
|
This seems to have been open for a long time, we need this too and after trying/debugging found it doesn't work (tenantId is ignored). Is there any plan to add multi-tenant support to the FlutterFire authentication api's ? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Identity Platform, which relies on Firebase Authentication SDKs for most of the operations ( from my understanding FBA is becoming an abstraction over Identity Platform ), provides multi tenancy support, essentially splitting users by
tenantId, which must be provided at login time.Is there any work in progress or ETA on this feature compatibility for the Flutter plugin?
Thank you for your time.
All reactions