From 5dbb1fd1ee0c3288865acb61948daae594cf9db9 Mon Sep 17 00:00:00 2001 From: Michael Nahkies Date: Mon, 26 Feb 2024 21:35:46 +0000 Subject: [PATCH] fix!: ios enrollmentDate -> enrollmentTime rename enrollmentDate -> enrollmentTime on iOS to match Android/Web (ref: https://firebase.google.com/docs/reference/js/auth.multifactorinfo) ref: - https://github.com/invertase/react-native-firebase/blob/main/packages/auth/android/src/main/java/io/invertase/firebase/auth/ReactNativeFirebaseAuthModule.java#L2500 - https://github.com/invertase/react-native-firebase/blob/main/packages/auth/lib/index.d.ts#L483 BREAKING CHANGE: enrollmentDate renamed to enrollmentTime on iOS split from #7565 --- packages/auth/ios/RNFBAuth/RNFBAuthModule.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/auth/ios/RNFBAuth/RNFBAuthModule.m b/packages/auth/ios/RNFBAuth/RNFBAuthModule.m index 76862bc069..623ad1d393 100644 --- a/packages/auth/ios/RNFBAuth/RNFBAuthModule.m +++ b/packages/auth/ios/RNFBAuth/RNFBAuthModule.m @@ -1686,13 +1686,13 @@ - (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, }]; } return enrolledFactors;