diff options
author | Zsika Phillip <protocol86@users.noreply.github.com> | 2018-04-17 17:57:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-17 17:57:05 -0700 |
commit | 6a39c71be83f589550c7dfa3c6d89d8b6145887c (patch) | |
tree | e38b2b31ebcfc02087581a33cced3cd2b189fd31 /Firebase/Auth/Source | |
parent | e36cc9610b11dfd2581ba5e3fda1917e0d5e697a (diff) |
Fixes error handling when parsing tokens. (#1131)
Diffstat (limited to 'Firebase/Auth/Source')
-rw-r--r-- | Firebase/Auth/Source/FIRUser.m | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Firebase/Auth/Source/FIRUser.m b/Firebase/Auth/Source/FIRUser.m index 013a13f..8dc5739 100644 --- a/Firebase/Auth/Source/FIRUser.m +++ b/Firebase/Auth/Source/FIRUser.m @@ -843,7 +843,7 @@ static void callInMainThreadWithAuthDataResultAndError( "error" out parameter. */ - (FIRAuthTokenResult *)parseIDToken:(NSString *)token error:(NSError **)error { - error = nil; + *error = nil; NSArray *tokenStringArray = [token componentsSeparatedByString:@"."]; // The token payload is always the second index of the array. NSMutableString *tokenPayload = [[NSMutableString alloc] initWithString:tokenStringArray[1]]; @@ -863,7 +863,7 @@ static void callInMainThreadWithAuthDataResultAndError( [NSJSONSerialization JSONObjectWithData:decodedTokenPayloadData options:NSJSONReadingMutableContainers|NSJSONReadingAllowFragments error:error]; - if (error) { + if (*error) { return nil; } |