Hi All,
I am trying to use OAuth2.0 authentication in iOS client.
For this, I have created one clientID for iOS app in Google Developer
Consol. This generated the ClientID and iOS redirect URI.
With the help of GTMOAuth2ViewControllerTouch, I am trying to get access
token of the User. Below is the code:-
GTMOAuth2ViewControllerTouch *viewController;
viewController = [[GTMOAuth2ViewControllerTouch alloc] initWithScope
:scope
clientID
:kMyClientID
clientSecret
:kMyClientSecret
keychainItemName
:kKeychainItemName
delegate
:self
finishedSelector
:@selector(viewController:finishedWithAuth:error:)];
[self presentModalViewController:viewController
animated:YES];
- (void)viewController:(GTMOAuth2ViewControllerTouch *)viewController
finishedWithAuth:(GTMOAuth2Authentication *)auth
error:(NSError *)error {
[self dismissModalViewControllerAnimated:YES];
if (error != nil) {
// Authentication failed
NSLog(@"error description%@",error.description);
} else {
// Authentication succeeded
signedIn = true;
[[self domainService] setAuthorizer:auth];
auth.authorizationTokenKey = @"id_token";
NSLog(@"\n accessToken value is %@",auth.accessToken);
[self showEnterPinDialogue:auth.userEmail isConfirmEnable:true];
}
}
Now, I am getting error during signin process is "redirect_uri_mismatch".
After this, I generated new ClientID with category "Others App" . This step
results in the generation of ClientID and ClientSecret. Now I had used this
ClientID in the project and google Sign In is successful.
Please explain me, Why clientID for Ios client not worked but for "others"
its working.
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-appengine/5c5fa4ae-d739-4ad2-a86c-ce6e041af22b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.