diff options
author | Zsika Phillip <protocol86@users.noreply.github.com> | 2017-11-05 22:14:55 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-05 22:14:55 -0800 |
commit | 895b9438ae1f538dad4e8b9a7cff335f601fb115 (patch) | |
tree | d2c479136d4399f6f9b586a97d8472729a87ee15 /Firebase | |
parent | cfd8118355dd63e666e51a3ba532e8a25393a99c (diff) |
Handle error after phone auth linking (#422)
Handles possible errors after linking phone number.
Also sets anonymous ivar to NO if linking succeeded.
Diffstat (limited to 'Firebase')
-rw-r--r-- | Firebase/Auth/Source/FIRUser.m | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Firebase/Auth/Source/FIRUser.m b/Firebase/Auth/Source/FIRUser.m index 0e56da4..d0e7e36 100644 --- a/Firebase/Auth/Source/FIRUser.m +++ b/Firebase/Auth/Source/FIRUser.m @@ -659,6 +659,12 @@ static void callInMainThreadWithAuthDataResultAndError( // Get account info to update cached user info. [self getAccountInfoRefreshingCache:^(FIRGetAccountInfoResponseUser *_Nullable user, NSError *_Nullable error) { + if (error) { + [self signOutIfTokenIsInvalidWithError:error]; + completion(error); + return; + } + _anonymous = NO; if (![self updateKeychain:&error]) { completion(error); return; |