2
0
mirror of synced 2025-02-02 09:34:45 +00:00

[auth][ios] Add auth language methods

This commit is contained in:
Elliot Hesp 2017-11-30 10:17:04 +00:00
parent 8511705d8e
commit b266a04510

View File

@ -912,6 +912,34 @@ RCT_EXPORT_METHOD(fetchProvidersForEmail:
return credential;
}
/**
setLanguageCode
@param NSString code
@return
*/
RCT_EXPORT_METHOD(setLanguageCode:
(NSString *) appName
code:
(NSString *) code) {
FIRApp *firApp = [FIRApp appNamed:appName];
[FIRAuth authWithApp:firApp].languageCode = code;
}
/**
useDeviceLanguage
@param NSString code
@return
*/
RCT_EXPORT_METHOD(useDeviceLanguage:
(NSString *) appName) {
FIRApp *firApp = [FIRApp appNamed:appName];
[[FIRAuth authWithApp:firApp] useAppLanguage];
}
// This is here to protect against bugs in the iOS SDK which don't
// correctly refresh the user object when performing certain operations
- (void)reloadAndReturnUser:(FIRUser *)user