File tree Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -1695,6 +1695,7 @@ - (NSDictionary *)firebaseUserToDict:(FIRUser *)user {
16951695 @" enrollmentTime" : enrollmentTime,
16961696 // @deprecated enrollmentDate kept for backwards compatibility, please use enrollmentTime
16971697 @" enrollmentDate" : enrollmentTime,
1698+ @" phoneNumber" : hint.phoneNumber ,
16981699 }];
16991700 }
17001701 return enrolledFactors;
Original file line number Diff line number Diff line change @@ -472,7 +472,21 @@ export namespace FirebaseAuthTypes {
472472 /**
473473 * Contains information about a second factor.
474474 */
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 {
476490 /**
477491 * User friendly name for this factor.
478492 */
@@ -481,21 +495,12 @@ export namespace FirebaseAuthTypes {
481495 * Time the second factor was enrolled, in UTC.
482496 */
483497 enrollmentTime : string ;
484- /**
485- * Type of factor.
486- */
487- factorId : FactorId ;
488498 /**
489499 * Unique id for this factor.
490500 */
491501 uid : string ;
492502 }
493503
494- export interface PhoneMultiFactorInfo extends MultiFactorInfo {
495- factorId : "phone" ;
496- phoneNumber : string ;
497- }
498-
499504 export interface MultiFactorAssertion {
500505 token : string ;
501506 secret : string ;
You can’t perform that action at this time.
0 commit comments