Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google App Engine: Endpoints authentication with ID and password

We have an HTML5 client accessing a Google Cloud Endpoints backend. We want to offer users a reasonable range of sign-in methods, e.g.: sign-in with an existing OpenID, or alternatively sign-up with an email and password. These seem like basic requirements to us! If there is a better alternative that does not restrict our audience, then we'd consider it.

We're encountering two problems: (1) it seems the Endpoints service will only authenticate Google accounts, and (2) we don't know how to support "sign-up with email and password" together with Endpoints.

Edited: We found that our requirements can work together with Endpoints, but we did not find any Python examples to help, or to support an OpenID provider. We created our own "email/password" authentication option and enable it in parallel with Google OAuth. Overall the documentation on authentication when using Cloud Endpoints is minimal. Documentation and examples are stronger for the newer "Mobile Backend" project.

like image 308
user3011479 Avatar asked Nov 20 '13 06:11

user3011479


People also ask

What are the different methods for the authentication of Google Compute Engine API?

Google Cloud supports three main types of credentials by which apps can gain access to API s and services. These are API keys, OAuth 2.0 client ID s and service accounts.


1 Answers

You are right, at this point you can build an oAuth provider using the lib provided in app-engine but that requires your users to have an Google account. So to protect my API I had to build my own custom oAuth2 provider. I did this by using the python oAuthLib library (oAuthLib). They have an awesome doc that will guide you through. I also made a rough document on how I made it app engine specific. If interested please take a look at the link Blog page

I hope this helps.

like image 53
shakirthow Avatar answered Sep 22 '22 05:09

shakirthow