I've got an app currently running on Google App Engine that takes advantage of the close integration with Google Accounts to the extent that it was the only way users would sign in. The sign-in process was this:

  1. User would click sign-in w/ Google Account link, which would just be the output of `users.create_login_url()`
  2. User would sign-in on Google-themed page.
  3. User would be signed-in

Now I'm moving away from App Engine to a host with vanilla Django. I'd like to replicate that login process as much as possible, I guess using OpenID (or OAuth? I'm not sure). I'm not sure exactly how to do so, though. Would I use Django's auth APIs and just use the user's Google Account data to sign them in?

I've followed the instructions here, and now have functional little demo where I get the user's Google Account address. But that really doesn't help me much.

Anyone have experience with this, or have an idea of how one would accomplish this?

Accepted Answer

Since you can't use the App Engine API to do so (and you probably don't want to write this OpenID auth system by yourself), you better make use of a django app to do so. Have a look at Django packages. I personally have good experience with django-socialregistration, though they provide Facebook/Twitter auth as well. There also OpenID only packages available.

Written by Torsten
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki