[ios][auth] fix unlink method - missing appName / targeted app instance after master merge

This commit is contained in:
Salakar 2017-07-17 18:26:13 +01:00
parent a0c42c7d39
commit 48570f5510
1 changed files with 3 additions and 2 deletions

View File

@ -631,8 +631,9 @@ RCT_EXPORT_METHOD(link:(NSString *) appName
@param RCTPromiseRejectBlock reject
@return
*/
RCT_EXPORT_METHOD(unlink:(NSString *)providerId resolver:(RCTPromiseResolveBlock) resolve rejecter:(RCTPromiseRejectBlock) reject) {
FIRUser *user = [FIRAuth auth].currentUser;
RCT_EXPORT_METHOD(unlink:(NSString *) appName providerId:(NSString *)providerId resolver:(RCTPromiseResolveBlock) resolve rejecter:(RCTPromiseRejectBlock) reject) {
FIRApp *firApp = [FIRApp appNamed:appName];
FIRUser *user = [FIRAuth authWithApp:firApp].currentUser;
if (user) {
[user unlinkFromProvider:providerId completion:^(FIRUser *_Nullable _user, NSError *_Nullable error) {