Skip to content

Commit bd51cec

Browse files
authored
Fix ToTP typings issue (#7179)
1 parent 8c9f8c8 commit bd51cec

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

.changeset/soft-zoos-listen.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/auth': patch
3+
---
4+
5+
Fix typings for `TotpMultiFactorGenerator`. This fixes a reversion in 9.19.0.

common/api-review/auth.api.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -754,8 +754,7 @@ export interface TotpMultiFactorAssertion extends MultiFactorAssertion {
754754
export class TotpMultiFactorGenerator {
755755
static assertionForEnrollment(secret: TotpSecret, oneTimePassword: string): TotpMultiFactorAssertion;
756756
static assertionForSignIn(enrollmentId: string, oneTimePassword: string): TotpMultiFactorAssertion;
757-
// Warning: (ae-forgotten-export) The symbol "FactorId" needs to be exported by the entry point index.d.ts
758-
static FACTOR_ID: FactorId_2;
757+
static FACTOR_ID: "totp";
759758
static generateSecret(session: MultiFactorSession): Promise<TotpSecret>;
760759
}
761760

docs-devsite/auth.totpmultifactorgenerator.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export declare class TotpMultiFactorGenerator
2222

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

2727
## Methods
2828

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

4141
```typescript
42-
static FACTOR_ID: FactorId;
42+
static FACTOR_ID: 'totp';
4343
```
4444

4545
## TotpMultiFactorGenerator.assertionForEnrollment()

packages/auth/src/mfa/assertions/totp.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export class TotpMultiFactorGenerator {
107107
/**
108108
* The identifier of the TOTP second factor: `totp`.
109109
*/
110-
static FACTOR_ID = FactorId.TOTP;
110+
static FACTOR_ID: 'totp' = FactorId.TOTP;
111111
}
112112

113113
export class TotpMultiFactorAssertionImpl

0 commit comments

Comments
 (0)