Logout / Repeat login issue, only on live server

59 views
Skip to first unread message

Kris Bird

unread,
Nov 23, 2013, 9:11:06 AM11/23/13
to gae-sim...@googlegroups.com
So I have copy-pasted all the functional stuff from the simpleauth example into my app.  

I am testing with google login and facebook login.  When I run it locally, everything works perfectly.   I have set up suitable callback permissions for facebook and google (2 accounts for facebook, and two urls for google).

So, when running the local server, I can login, logout, login, logout (to google/facebook), and everything works great.

When I run on the live server, I can login to google or facebook once each.  So, I login to google, it works and I get redirectly back to my "profile".  I logout, login to facebook, again I get my profile successfully.

But when I logout again, if I try to login to google, it appears to go through OK, but instead of redirecting to my profile, I get redirected to my "/login" screen.   I can only log in to google once, and facebook once.

If I delete the "_simpleauth_sess" cookie, it works again, for one login each for google/facebook,

I'm stuck, I can't for the life of me work out the problem...   Any ideas?

Kris

Kris Bird

unread,
Nov 25, 2013, 7:53:12 AM11/25/13
to gae-sim...@googlegroups.com
Commenting out these seems to have fixed it,

from def _on_signin.......
    #self.session.add_flash(data, 'data - from _on_signin(...)')
    #self.session.add_flash(auth_info, 'auth_info - from _on_signin(...)')

So that's my application fixed, but if anyone can offer insight into what's happening, let me know.

Kris

alex

unread,
Oct 2, 2014, 5:35:08 AM10/2/14
to gae-sim...@googlegroups.com
Hi Kris,

Actually, that's it. What happend is self.session.add_flash(data) contains too big chunk of a data to fit into the cookies so apparently webapp2 (or the browser) silently ignores all the session including authentication.

Commenting out those two lines (or just the first one - data) leaves enough room in the cookies to store auth session.
Reply all
Reply to author
Forward
0 new messages