Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generating users accounts inside Google App Engine

For a project, I'm going to create an application on Google App Engine where:

  • Discussion Leaders can register with their e-mail address (or OpenID or Google Account) on the website itself to use it.
  • In the application admin page they can create a group discussion for which they can add users based on their e-mail address
  • and these users should then receive generated account details (if they don't have accounts yet) making them able to log in to that group discussion with their newly created account.

I don't want to require discussion leaders to having a Google Account or OpenID account in order to register for the application and all user other accounts must be generated by the discussion leader.

However Google App Engine seems to only support Google Accounts and OpenID accounts. How would I go about this? Is there an existing pattern for creating leader-accounts and generating user-accounts from within the Google App Engine which still support the GAE User API?

like image 461
mahler Avatar asked Jun 18 '12 13:06

mahler


People also ask

What are the components in Google App Engine infrastructure?

Google App Engine primarily supports Go, PHP, Java, Python, Node. js, . NET, and Ruby applications, although it can also support other languages via "custom runtimes". The service is free up to a certain level of consumed resources and only in standard environment but not in flexible environment.

What are the key features in Google App Engine application environment?

GAE lets users record data and run diagnostics on applications to gauge performance. Security features. GAE enables users to define access policies with the GAE firewall and managed Secure Sockets Layer/Transport Layer Security certificates for free. Traffic splitting.

What service account does App Engine use?

The App Engine default service account is associated with your Cloud project and executes tasks on behalf of your apps running in App Engine.

How many types of instances does Google App Engine offer?

Google App Engine provides four possible runtime environments for applications, one for each of four programming languages: Java, Python, PHP, and Go. The environment you choose depends on the language and related technologies you want to use for developing the application.


1 Answers

EngineAuth

A few months ago I developed a python package called EngineAuth. It uses a middleware to intercept request intended for authentication.

Here's an example app:

http://engineauth.scotchmedia.com/

And the source:

https://github.com/scotch/engineauth

EngineAuth has various authentication strategies. One of which is password.

Password takes a password and a string (could be an email). If the string is in the datastore it checks the password against a stored hash. If it matches it logs the user in. If the string is not in the datastore it creates a new user.

EngineAuth also has an appengine_openid strategy which allows you to login users using App Engine Openid.

The nice thing about EngineAuth is that if your user is logged in App Engine OpenID and they then log in with a password, it associates the user with both strategies.

aeauth

I wasn't completely satisfied with EngineAuth, however, so I decided to create a more module design that was more dependent on webapp2. I never completed, as I'm developing the project in Go now, but maybe the code will help.

webapp2 auth

Much of the password functionality of EngineAuth and aeauth was taken from webapp2_extras/auth that might give you a simpilar approach.

like image 74
Kyle Finley Avatar answered Sep 28 '22 11:09

Kyle Finley