Start a new topic

Google Plus user Sign In

I am authenticating a user using Google+ Sign-In for iOS.

My problem is once I get the access token, I don't know how to create a KCSUser for my backend.

I suppose I should use [KCSUser loginWithSocialIdentity:KCSSocialIDOther accessDictionary: *] with some access Dictionary

Am I missing something?

Yes, construct the access dictionary like the one described in :

Can you `po` the userInfo and paste it out here?
Google+ login

auth is GTMOAuth2Authentication received from Google+ finishedWithAuth method


NSDictionary* accessDict = @{@"_socialIdentity": @{@"google": @{@"access_token": [auth accessToken],@"expires_in": [auth expiresIn] } } };

[KCSUser loginWithSocialIdentity:KCSSocialIDOther accessDictionary: accessDict withCompletionBlock:^(KCSUser *user, NSError *errorOrNil, KCSUserActionResult result){}];


Login or Signup to post a comment