Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable multitenancy in Firebase.Auth project #218

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GiampaoloGabba
Copy link

@GiampaoloGabba GiampaoloGabba commented Jun 9, 2024

I'm opening this draft to know if you are interested in support multitenancy.
I'have upated only the Firebase.Auth project, i'm not using UI and also dont have the winui3 and uwp sdk installed.

There are not "strict" breaking changes: the tenantId is an optional string. But even if its optional, people updating the nuget will be required to recompile their project (but this should not be a problem: if you are updating a nuget, then you'll likely recompile your project @ 😄 )

Some additional tests will be required, but for now everything seems working great (already using it in my app without problems).

For reference, i took the requests that have the tenantId field in input from here:
https://developers.google.com/resources/api-libraries/documentation/identitytoolkit/v3/python/latest/identitytoolkit_v3.relyingparty.html#verifyAssertion

https://cloud.google.com/identity-platform/docs/use-rest-api?hl=it#section-confirm-email-verification

@bezysoftware
Copy link
Collaborator

I had a quick look at the official firebase samples and they do not have the tentantId in their method signatures - instead they populate the tenantId in their version of our config object: firebase.auth().tenantId = '...'

I wonder if this solution would make the code more clean? By adding it to FirebaseAuthConfig it would also minimize the changes needed to FirebaseUI, which uses FirebaseUIConfig which in turn directly inherits from FirebaseAuthConfig.

So in other words add the TenantId to FirebaseAuthConfig, revert the method signatures in FirebaseAuthClient and use the new property from config.

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants