Skip to content

Commit a3c89bd

Browse files
committed
Add emulator methods to auth-types.
1 parent 5538349 commit a3c89bd

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

packages-exp/auth-compat-exp/src/auth.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ export class Auth
7575
);
7676
}
7777

78+
get emulatorConfig(): compat.EmulatorConfig | null {
79+
// TODO
80+
return null;
81+
}
82+
7883
get currentUser(): compat.User | null {
7984
if (!this.auth.currentUser) {
8085
return null;

packages/auth-types/index.d.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,15 @@ export class PhoneMultiFactorGenerator {
389389
): PhoneMultiFactorAssertion;
390390
}
391391

392+
export interface EmulatorConfig {
393+
protocol: string;
394+
host: string;
395+
port: number | null;
396+
options: {
397+
disableWarnings: boolean;
398+
};
399+
}
400+
392401
export class FirebaseAuth {
393402
private constructor();
394403

@@ -407,6 +416,7 @@ export class FirebaseAuth {
407416
password: string
408417
): Promise<UserCredential>;
409418
currentUser: User | null;
419+
readonly emulatorConfig: EmulatorConfig | null;
410420
fetchSignInMethodsForEmail(email: string): Promise<Array<string>>;
411421
isSignInWithEmailLink(emailLink: string): boolean;
412422
getRedirectResult(): Promise<UserCredential>;
@@ -455,6 +465,7 @@ export class FirebaseAuth {
455465
tenantId: string | null;
456466
updateCurrentUser(user: User | null): Promise<void>;
457467
useDeviceLanguage(): void;
468+
useEmulator(url: string, options?: { disableWarnings?: boolean }): void;
458469
verifyPasswordResetCode(code: string): Promise<string>;
459470
}
460471

0 commit comments

Comments
 (0)