Closed mirkarpude closed 4 years ago
Unless we get some contributions from the community, I don't expect it to happen in the near future.
See #152
Usage:
var auth = FirebaseAuth.DefaultInstance.TenantManager.AuthForTenant("my-tenant-id");
@hiranya911
FirebaseAuth
and TenantAwareFirebaseAuth
classes inherit AbstractFirebaseAuth
.
I decided to have both TenantManager
and TenantId
properties in AbstractFirebaseAuth
instead of FirebaseAuth
so the public API is currently exactly the same except for static members.
TenantManager
has one function AuthForTenant. In the future the manager will also contain admin functions for managing tenants.
Based on the API signatures we've come for the Java SDK:
class AbstractFirebaseAuth {
// All existing methods in FirebaseAuth
}
class FirebaseAuth : AbstractFirebaseAuth {
TenantManager TenantManager { get; }
}
class TenantAwareFirebaseAuth : AbstractFirebaseAuth {
}
class TenantManager {
TenantAwareFirebaseAuth AuthForTenant(string tenantId);
Task<Tenant> GetTenantAsync(string tenantId);
Task<Tenant> CreateTenantAsync(TenantArgs args);
Task<Tenant> UpdateTenantAsync(TenantArgs args);
Task DeleteTanantAsync(string tenantId);
PagedAsyncEnumerable<Tenants, Tenant> ListTenantsAsync(ListTenantsOptions options);
}
class Tenant {
string TenantId { get; }
string DisplayName { get; }
boolean PasswordSignUpAllowed { get; }
boolean EmailLinkSignInEnabled { get; }
}
It looks like #152 is nearly done but hasn't been touched since Feb. It would be great to get this merged if possible as it is useful functionality to have in the dotnet SDK.
Authenticating with multi-tenancy