Skip to content

Commit

Permalink
fix: ios enrollmentDate -> enrollmentTime
Browse files Browse the repository at this point in the history
  • Loading branch information
mnahkies committed Mar 9, 2024
1 parent fae5966 commit ec3ea1b
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 ec3ea1b

Please sign in to comment.