From 79f3643bcd147477372724644ecc0039cde2db2e Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Fri, 31 Mar 2023 09:29:36 -0700 Subject: [PATCH 1/3] Fix ToTP typings issue --- common/api-review/auth.api.md | 3 +-- docs-devsite/auth.totpmultifactorgenerator.md | 4 ++-- packages/auth/src/mfa/assertions/totp.ts | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/common/api-review/auth.api.md b/common/api-review/auth.api.md index 5b147491212..9d7d1eae576 100644 --- a/common/api-review/auth.api.md +++ b/common/api-review/auth.api.md @@ -754,8 +754,7 @@ export interface TotpMultiFactorAssertion extends MultiFactorAssertion { export class TotpMultiFactorGenerator { static assertionForEnrollment(secret: TotpSecret, oneTimePassword: string): TotpMultiFactorAssertion; static assertionForSignIn(enrollmentId: string, oneTimePassword: string): TotpMultiFactorAssertion; - // Warning: (ae-forgotten-export) The symbol "FactorId" needs to be exported by the entry point index.d.ts - static FACTOR_ID: FactorId_2; + static FACTOR_ID: "totp"; static generateSecret(session: MultiFactorSession): Promise; } diff --git a/docs-devsite/auth.totpmultifactorgenerator.md b/docs-devsite/auth.totpmultifactorgenerator.md index 93b7c485f40..3105480aedc 100644 --- a/docs-devsite/auth.totpmultifactorgenerator.md +++ b/docs-devsite/auth.totpmultifactorgenerator.md @@ -22,7 +22,7 @@ export declare class TotpMultiFactorGenerator | Property | Modifiers | Type | Description | | --- | --- | --- | --- | -| [FACTOR\_ID](./auth.totpmultifactorgenerator.md#totpmultifactorgeneratorfactor_id) | static | FactorId | The identifier of the TOTP second factor: totp. | +| [FACTOR\_ID](./auth.totpmultifactorgenerator.md#totpmultifactorgeneratorfactor_id) | static | "totp" | The identifier of the TOTP second factor: totp. | ## Methods @@ -39,7 +39,7 @@ The identifier of the TOTP second factor: `totp`. Signature: ```typescript -static FACTOR_ID: FactorId; +static FACTOR_ID: "totp"; ``` ## TotpMultiFactorGenerator.assertionForEnrollment() diff --git a/packages/auth/src/mfa/assertions/totp.ts b/packages/auth/src/mfa/assertions/totp.ts index 35694ed39eb..17d3e0d6536 100644 --- a/packages/auth/src/mfa/assertions/totp.ts +++ b/packages/auth/src/mfa/assertions/totp.ts @@ -107,7 +107,7 @@ export class TotpMultiFactorGenerator { /** * The identifier of the TOTP second factor: `totp`. */ - static FACTOR_ID = FactorId.TOTP; + static FACTOR_ID: 'totp' = FactorId.TOTP; } export class TotpMultiFactorAssertionImpl From 180e9e0e64d6837577bc40b67e323e4568b3a14c Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Fri, 31 Mar 2023 10:14:47 -0700 Subject: [PATCH 2/3] single quote? --- docs-devsite/auth.totpmultifactorgenerator.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs-devsite/auth.totpmultifactorgenerator.md b/docs-devsite/auth.totpmultifactorgenerator.md index 3105480aedc..105cc575df7 100644 --- a/docs-devsite/auth.totpmultifactorgenerator.md +++ b/docs-devsite/auth.totpmultifactorgenerator.md @@ -22,7 +22,7 @@ export declare class TotpMultiFactorGenerator | Property | Modifiers | Type | Description | | --- | --- | --- | --- | -| [FACTOR\_ID](./auth.totpmultifactorgenerator.md#totpmultifactorgeneratorfactor_id) | static | "totp" | The identifier of the TOTP second factor: totp. | +| [FACTOR\_ID](./auth.totpmultifactorgenerator.md#totpmultifactorgeneratorfactor_id) | static | 'totp' | The identifier of the TOTP second factor: totp. | ## Methods @@ -39,7 +39,7 @@ The identifier of the TOTP second factor: `totp`. Signature: ```typescript -static FACTOR_ID: "totp"; +static FACTOR_ID: 'totp'; ``` ## TotpMultiFactorGenerator.assertionForEnrollment() From c5513a604156b7b69662598c636cf7f02a75a97d Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Fri, 31 Mar 2023 10:45:24 -0700 Subject: [PATCH 3/3] add changeset --- .changeset/soft-zoos-listen.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/soft-zoos-listen.md diff --git a/.changeset/soft-zoos-listen.md b/.changeset/soft-zoos-listen.md new file mode 100644 index 00000000000..72ba1402d09 --- /dev/null +++ b/.changeset/soft-zoos-listen.md @@ -0,0 +1,5 @@ +--- +'@firebase/auth': patch +--- + +Fix typings for `TotpMultiFactorGenerator`. This fixes a reversion in 9.19.0.