File tree 2 files changed +17
-11
lines changed
2 files changed +17
-11
lines changed Original file line number Diff line number Diff line change @@ -1667,7 +1667,8 @@ - (NSDictionary *)firebaseUserToDict:(FIRUser *)user {
1667
1667
@" uid" : hint.UID ,
1668
1668
@" factorId" : hint.factorID == nil ? [NSNull null ] : [self getJSFactorId: (hint.factorID)],
1669
1669
@" displayName" : hint.displayName == nil ? [NSNull null ] : hint.displayName ,
1670
- @" enrollmentDate" : enrollmentDate,
1670
+ @" enrollmentTime" : enrollmentDate,
1671
+ @" phoneNumber" : hint.phoneNumber
1671
1672
}];
1672
1673
}
1673
1674
return enrolledFactors;
Original file line number Diff line number Diff line change @@ -472,7 +472,21 @@ export namespace FirebaseAuthTypes {
472
472
/**
473
473
* Contains information about a second factor.
474
474
*/
475
- export interface MultiFactorInfo {
475
+ export type MultiFactorInfo = PhoneMultiFactorInfo | TotpMultiFactorInfo ;
476
+
477
+ export interface PhoneMultiFactorInfo extends MultiFactorInfoCommon {
478
+ factorId : 'phone' ;
479
+ /**
480
+ * The phone number used for this factor.
481
+ */
482
+ phoneNumber : string ;
483
+ }
484
+
485
+ export interface TotpMultiFactorInfo extends MultiFactorInfoCommon {
486
+ factorId : 'totp' ;
487
+ }
488
+
489
+ export interface MultiFactorInfoCommon {
476
490
/**
477
491
* User friendly name for this factor.
478
492
*/
@@ -481,21 +495,12 @@ export namespace FirebaseAuthTypes {
481
495
* Time the second factor was enrolled, in UTC.
482
496
*/
483
497
enrollmentTime : string ;
484
- /**
485
- * Type of factor.
486
- */
487
- factorId : FactorId ;
488
498
/**
489
499
* Unique id for this factor.
490
500
*/
491
501
uid : string ;
492
502
}
493
503
494
- export interface PhoneMultiFactorInfo extends MultiFactorInfo {
495
- factorId : "phone" ;
496
- phoneNumber : string ;
497
- }
498
-
499
504
export interface MultiFactorAssertion {
500
505
token : string ;
501
506
secret : string ;
You can’t perform that action at this time.
0 commit comments