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

Add support for multi tenant authentication #735

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions auth/src/swig/auth.i
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
%include "app/src/swig/null_check_this.i"
%include "app/src/swig/serial_dispose.i"
%include "stdint.i"
%include "std_string.i"

%{
namespace firebase {
Expand Down Expand Up @@ -476,6 +477,12 @@ static CppInstanceManager<Auth> g_auth_instances;
%csmethodmodifiers set_language_code(const char *lagnuage_code) "internal";
%rename(SetLanguageCodeInternal) set_language_code;

%csmethodmodifiers testrminal_id() "internal";
%rename(TenantIdInternal) tenant_id;

%csmethodmodifiers set_tenant_id(const char *tenant_id) "internal";
%rename(SetTenantIdInternal) set_tenant_id;

%include "app/src/swig/init_result.i"

// Implemented inline below.
Expand Down Expand Up @@ -564,6 +571,16 @@ static CppInstanceManager<Auth> g_auth_instances;
}
}

/// The user-facing terminal id for multi-tenant authentication
public System.String TenantId {
get {
return TenantIdInternal();
}
set {
SetTenantIdInternal(value);
}
}

/// @deprecated This method is deprecated in favor of methods that return
/// `Task<AuthResult>`. Please use
/// @ref SignInWithProviderAsync(FederatedAuthProvider) instead.
Expand Down