[auth][ios] Add auth language methods
This commit is contained in:
parent
8511705d8e
commit
b266a04510
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue