Skip to content

Commit

Permalink
fix(auth, ios): deprecate MultifactorInfo.enrollmentDate should be `e…
Browse files Browse the repository at this point in the history
  • Loading branch information
mnahkies authored Apr 12, 2024
1 parent 1ae7481 commit d9987da
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/auth/ios/RNFBAuth/RNFBAuthModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -1686,13 +1686,15 @@ - (NSDictionary *)firebaseUserToDict:(FIRUser *)user {
NSMutableArray *enrolledFactors = [NSMutableArray array];

for (FIRPhoneMultiFactorInfo *hint in hints) {
NSString *enrollmentDate =
NSString *enrollmentTime =
[[[NSISO8601DateFormatter alloc] init] stringFromDate:hint.enrollmentDate];
[enrolledFactors addObject:@{
@"uid" : hint.UID,
@"factorId" : [self getJSFactorId:(hint.factorID)],
@"displayName" : hint.displayName == nil ? [NSNull null] : hint.displayName,
@"enrollmentDate" : enrollmentDate,
@"enrollmentTime" : enrollmentTime,
// @deprecated enrollmentDate kept for backwards compatibility, please use enrollmentTime
@"enrollmentDate" : enrollmentTime,
}];
}
return enrolledFactors;
Expand Down Expand Up @@ -1745,4 +1747,4 @@ - (FIRActionCodeSettings *)buildActionCodeSettings:(NSDictionary *)actionCodeSet
return settings;
}

@end
@end

0 comments on commit d9987da

Please sign in to comment.