Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

SimpleAuthGoogleWebProvider.m: do not crash if account fields are not… #104

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jbicket
Copy link

@jbicket jbicket commented Jun 26, 2015

I have been using this and got a crash when I logged in for the first time. Google did not populate all the values, and objectForKey (which is what the assignment does below) cannot handle null values so the library would crash.

My profile came back as:
info = {
email = "[email protected]";
"first_name" = John;
image = "https://lh5.googleusercontent.com/-hTUulT9CemI/AAAAAAAAAAI/AAAAAAAAABs/o6pMlpQ0Lvk/photo.jpg";
"last_name" = Bicket;
name = "John Bicket";
verified = 1;
};

… present in response

objectForKey (which is what the assignment does below) cannot handle null values.

While testing my profile came back as the following:
info = {
 email = "[email protected]";
 "first_name" = John;
 image = "https://lh5.googleusercontent.com/-hTUulT9CemI/AAAAAAAAAAI/AAAAAAAAABs/o6pMlpQ0Lvk/photo.jpg";
 "last_name" = Bicket;
 name = "John Bicket";
 verified = 1;
};
@konradholub
Copy link

+1

1 similar comment
@plzen
Copy link

plzen commented Mar 1, 2016

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants