Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/soft-zoos-listen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@firebase/auth': patch
---

Fix typings for `TotpMultiFactorGenerator`. This fixes a reversion in 9.19.0.
3 changes: 1 addition & 2 deletions common/api-review/auth.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<TotpSecret>;
}

Expand Down
4 changes: 2 additions & 2 deletions docs-devsite/auth.totpmultifactorgenerator.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export declare class TotpMultiFactorGenerator

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [FACTOR\_ID](./auth.totpmultifactorgenerator.md#totpmultifactorgeneratorfactor_id) | <code>static</code> | FactorId | The identifier of the TOTP second factor: <code>totp</code>. |
| [FACTOR\_ID](./auth.totpmultifactorgenerator.md#totpmultifactorgeneratorfactor_id) | <code>static</code> | 'totp' | The identifier of the TOTP second factor: <code>totp</code>. |

## Methods

Expand All @@ -39,7 +39,7 @@ The identifier of the TOTP second factor: `totp`<!-- -->.
<b>Signature:</b>

```typescript
static FACTOR_ID: FactorId;
static FACTOR_ID: 'totp';
```

## TotpMultiFactorGenerator.assertionForEnrollment()
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/src/mfa/assertions/totp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down