From f4c106e7c032cc0cc94facc6a8690f30a6af173d Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 2 Jul 2021 11:50:46 -0700 Subject: [PATCH] [Auth] Add setters for tenantId and languageCode to auth compat (#5109) * [Auth] Add setters for tenantId and languageCode to auth compat * Formatting --- packages-exp/auth-compat-exp/src/auth.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages-exp/auth-compat-exp/src/auth.ts b/packages-exp/auth-compat-exp/src/auth.ts index a4ea71f359d..513ab3f7036 100644 --- a/packages-exp/auth-compat-exp/src/auth.ts +++ b/packages-exp/auth-compat-exp/src/auth.ts @@ -39,7 +39,8 @@ import { ReverseWrapper, Wrapper } from './wrap'; const _assert: typeof exp._assert = exp._assert; export class Auth - implements compat.FirebaseAuth, Wrapper, _FirebaseService { + implements compat.FirebaseAuth, Wrapper, _FirebaseService +{ readonly _delegate: exp.AuthImpl; constructor(readonly app: FirebaseApp, provider: Provider<'auth-exp'>) { @@ -107,12 +108,18 @@ export class Auth get languageCode(): string | null { return this._delegate.languageCode; } + set languageCode(languageCode: string | null) { + this._delegate.languageCode = languageCode; + } get settings(): compat.AuthSettings { return this._delegate.settings; } get tenantId(): string | null { return this._delegate.tenantId; } + set tenantId(tid: string | null) { + this._delegate.tenantId = tid; + } useDeviceLanguage(): void { this._delegate.useDeviceLanguage(); } @@ -348,7 +355,7 @@ export class Auth return this._delegate._delete(); } private linkUnderlyingAuth(): void { - ((this._delegate as unknown) as ReverseWrapper).wrapped = () => this; + (this._delegate as unknown as ReverseWrapper).wrapped = () => this; } }