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. 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..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 | 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