Skip to content

nweller/gae-oauth2-sample

 
 

Repository files navigation

What is this?

Google App Engine (GAE) OAuth 2.0 sample, based on google-api-python-client samples/appengine and modified.

  • use virtualenv.
  • use webapp2 and jinja2 instead of webapp

OAuth2 configuration

install python and google app engine sdk

On a mac, you can use homebrew.

brew install python
brew install google-app-engine
pip install virtualenv
./virtual_env_setup.sh

activate virtualenv

. ./bin/activate

edit your application ID and version in app.yaml

application: jovial-totality-414
version: 1

Try your application on localhost

Run dev server

dev_appserver.py .

Access to your application on localhost.

  1. Open http://localhost:8080 in your browser.
  2. Click the "proceed to the main application" link.
  3. Click the "Grant" link in "Grant this application permission to read your Buzz information and it will let you know how many followers you have."
  4. Grant your application titled "Project Default Service Account"
  5. Click the "proceed to the main application" link.
  6. The browser redirects to http://localhost:8080/about, and it prints "Hello, ${your name on Google+ here}".

Try your application on GAE

Deploy your application

appcfg.py --oauth2 update .

See Uploading, Downloading, and Managing a Python App - Python — Google Developers

Access to your application on GAE.

  1. Open https://jovial-totality-414.appspot.com in your browser (Replace jovial-totality-414 with your application ID).
  2. Click the "proceed to the main application" link.
  3. Click the "Grant" link in "Grant this application permission to read your Buzz information and it will let you know how many followers you have."
  4. Grant your application titled "Project Default Service Account"
  5. Click the "proceed to the main application" link.
  6. The browser redirects to https://jovial-totality-414.appspot.com/about, and it prints "Hello, ${your name on Google+ here}".

Original README

Simple Google+ sample that demonstrates the people API. Demontrates
using the OAuth 2.0 Decorator for Google App Engine applications.

api: plus
keywords: appengine oauth2

About

Google App Engine OAuth 2.0 sample

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 96.4%
  • Shell 3.6%