Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Authenticating into Google App Engine from an iOS device

I am working on an iPhone application that uses Google app engine to host the backend. I need to authenticate with Google but I can't seem to find a way to do it from my app. It seems I am down to making a UIWebView to have a user sign in to the redirected login page I am getting from Google, but I would much rather have the user enter there credentials one time and then have it persist, unless the user signs out.

Is this possible? Should I be looking at other options or am I just not handling the redirect correctly?

Any suggestions or info would be appreciated.

Thanks

like image 245
sully77 Avatar asked Jan 05 '11 04:01

sully77


People also ask

How do I authenticate my Google API?

With a user account, you can authenticate to Google APIs and services in the following ways: Use the gcloud CLI to set up Application Default Credentials (ADC). Use the gcloud CLI to generate access tokens. Use your user credentials to impersonate a service account.

How does Google authenticate its users?

For Google Authentication usersAfter submitting their Google username, Composer will pop open to the Google login form and prompt the user for their password. The user enters their Google password and is automatically redirected back to the site, where they're logged in.

Is Google App Engine deprecated?

Looks like it is set to be deprecated on July 30, 2019 while the shutdown date is set for July 30,2020. You may find further details about this here. As for the launcher, we recommend moving to the Cloud SDK for future developments. You may install it here.


1 Answers

O-Auth is available on App Engine. Just insert GTMOAuth in your projet and present the GTMOAuthViewControllerTouch. You'll be able to store the auth token in the user's keychain.

Then authorize your NSURLMutableRequests via [auth authorizeRequest:myNSURLMutableRequest]... I think it might be easier than reusing and managing cookies.

like image 93
Remy Vanherweghem Avatar answered Sep 24 '22 13:09

Remy Vanherweghem