Skip to content

Flask Session is not working when flask-openid used in Google App Engine #16

rajendrakrp opened this Issue Apr 18, 2013 · 4 comments

2 participants



I am new to Flask and OpenID. I was trying to flask-openid in App Engine.

Followed the tutorial and used GAE datastore to store information during authentication process. I used '' and '' from to store data in GAE datastore. It required some modifications in and

Reproduction procedure:--
Download code from '' and development server by issuing following command inside the app: --port=9090 .

Follow the steps:--
1. Open browser and enter localhost:9090/login as url.
2. Enter 'OpenID' as ''
3. It will redirect to yahoo login page, enter your credentials.
4. After signing into, page will be redirected to localhost:9090

The problem is - it should not redirect to localhost:9090, according to code, it should redirect to page 'create_profile.html'. This is because session data 'openid' stored in 'create_or_login()' function is not retained when control goes to 'create_profile()' function. I have added necessary debug steps also. Please verify.

Please let me know if you need more information. I tried to explain as much possible. I didn't get any reponse from stackoverflow also(

Thanks in advance.


This may seem weird.I wrote some 'print' statements in '' for debugging purpose. Remove 'print' statement at line 357 in '', it worked.!!


What changes did you need to make to Flask-OpenID to make this work?

You did not need to modify the _default_store_factory function, but could have written a function in your app that returns the DatastoreStore() and pass that as store_factory to OpenID initialization.


Hi, Please find the diff at Code checked out at this commit sha:1f41c29. I didn't get time to look into it again.


Okay, yeah, the only real modification seem to be the datastore, which could be fixed with the store_factory argument.

The pickle utf-8 encoding has been fixed in 723e590

@puiterwijk puiterwijk closed this Jan 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.