Skip to content

Commit

Permalink
[Auth] Add setters for tenantId and languageCode to auth compat (#5109)
Browse files Browse the repository at this point in the history
* [Auth] Add setters for tenantId and languageCode to auth compat

* Formatting
  • Loading branch information
sam-gc authored Jul 2, 2021
1 parent 821f4d3 commit f4c106e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages-exp/auth-compat-exp/src/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ import { ReverseWrapper, Wrapper } from './wrap';
const _assert: typeof exp._assert = exp._assert;

export class Auth
implements compat.FirebaseAuth, Wrapper<exp.Auth>, _FirebaseService {
implements compat.FirebaseAuth, Wrapper<exp.Auth>, _FirebaseService
{
readonly _delegate: exp.AuthImpl;

constructor(readonly app: FirebaseApp, provider: Provider<'auth-exp'>) {
Expand Down Expand Up @@ -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();
}
Expand Down Expand Up @@ -348,7 +355,7 @@ export class Auth
return this._delegate._delete();
}
private linkUnderlyingAuth(): void {
((this._delegate as unknown) as ReverseWrapper<Auth>).wrapped = () => this;
(this._delegate as unknown as ReverseWrapper<Auth>).wrapped = () => this;
}
}

Expand Down

0 comments on commit f4c106e

Please sign in to comment.