[auth][ios] Reload the user when unlinking an account to ensure that it’s up to date
This commit is contained in:
parent
fec365f059
commit
4e66443c71
|
@ -794,7 +794,15 @@ RCT_EXPORT_METHOD(unlink:
|
|||
if (error) {
|
||||
[self promiseRejectAuthException:reject error:error];
|
||||
} else {
|
||||
[self promiseWithUser:resolve rejecter:reject user:_user];
|
||||
// This is here to protect against bugs in the iOS SDK which don't
|
||||
// correctly refresh the user object when unlinking certain accounts
|
||||
[user reloadWithCompletion:^(NSError * _Nullable error) {
|
||||
if (error) {
|
||||
[self promiseRejectAuthException:reject error:error];
|
||||
} else {
|
||||
[self promiseWithUser:resolve rejecter:reject user:user];
|
||||
}
|
||||
}];
|
||||
}
|
||||
}];
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue