File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -25,15 +25,11 @@ export default class TotpMultiFactorGenerator {
2525 }
2626
2727 static assertionForSignIn ( uid , verificationCode ) {
28- // There is no logic here, we mainly do this for API compatibility
29- // (following the Web API).
3028 return { uid, verificationCode } ;
3129 }
3230
3331 static assertionForEnrollment ( totpSecret , verificationCode ) {
34- // There is no logic here, we mainly do this for API compatibility
35- // (following the Web API).
36- return { totpSecret, verificationCode } ;
32+ return { totpSecret : totpSecret . secretKey , verificationCode } ;
3733 }
3834
3935 static async generateSecret ( session , auth ) {
Original file line number Diff line number Diff line change @@ -276,9 +276,16 @@ export namespace FirebaseAuthTypes {
276276 }
277277
278278 export interface TotpMultiFactorGenerator {
279- FACTOR_ID : FactorId . TOTP ;
279+ static FACTOR_ID : FactorId . TOTP ;
280280
281- assertionForSignIn ( uid : string , totpSecret : string ) : MultiFactorAssertion ;
281+ static assertionForSignIn ( uid : string , totpSecret : string ) : MultiFactorAssertion ;
282+
283+ static assertionForEnrollment ( secret : TotpSecret , code : string ) : MultiFactorAssertion ;
284+
285+ /**
286+ * @param auth - The Auth instance. Only used for native platforms, should be ignored on web.
287+ */
288+ static generateSecret ( session : FirebaseAuthTypes . MultiFactorSession , auth : FirebaseAuthTypes . Auth ) : Promise < TotpSecret > ;
282289 }
283290
284291 export declare interface MultiFactorError extends AuthError {
You can’t perform that action at this time.
0 commit comments