Hey Innovation Lab, Generally, a specific question like this would be better suited to stackoverflow. This forum is meant for more general discussion of the platform, and you'll find many more users on stackoverflow who are ready and willing to help you. Nonetheless I'll see if I can help you here.
How did you generate the iOS Client ID? What was the format of the redirect uri? It seems as though you should have no trouble using the iOS Client ID if all fields are properly filled-out and you followed all steps in the docs. Of course if you did that and the issue occurred, we'd have diagnosed an issue, but we need to make sure everything is done properly first in order to know if that's the case. Your source code sort-of looks like the code in the Endpoints docs <https://cloud.google.com/appengine/docs/python/endpoints/consume_ios> - are you attempting to auth to an Endpoints API? It also could be related to the code shown in the Drive API docs <https://developers.google.com/drive/ios/auth>, which shows a generic Google API OAuth2 flow for iOS. Did you follow those docs? Let me know where you started, and I'll see if I have any advice. Best wishes, Nick On Monday, September 7, 2015 at 5:35:19 AM UTC-4, Innovation Lab wrote: > > 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/34a73b8f-b29a-49e6-9f0d-d94aecf1ee2c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
