[Flask] Session timeout/ User authentication

David Baumgold david at davidbaumgold.com
Thu Aug 20 19:57:20 CEST 2015

Mandar, if you’re using Google OAuth with Flask, and you’re having trouble getting it to work, I’d love for you to check out Flask-Dance, which is a Flask extension I wrote to handle OAuth login. It’s also has a contrib module specific to Google, and the quickstart is here: http://flask-dance.readthedocs.org/en/latest/quickstarts/google.html There’s also a quickstart that shows how to set up a multi-user system using Flask-Login and Flask-SQLAlchemy: http://flask-dance.readthedocs.org/en/latest/quickstarts/sqla-multiuser.html

Is that useful?

David Baumgold

From: Mandar Rahurkar <rahurkar at gmail.com>
Reply: Mandar Rahurkar <rahurkar at gmail.com>>
Date: August 20, 2015 at 1:53:43 PM
To: flask at python.org <flask at python.org>>
Subject:  [Flask] Session timeout/ User authentication  

Hi Follow users,
I am currently using google oauth for authentication using rauth, Flask-Login extensions. I am also using "session['permanent'] = True" to remember the sessions for certain period when timing them out. However, what happens is the screen does not automatically refresh to logged out view upon session expiry and needs to be manually refreshed. 

One of the methods I have seen used is to pass a session id to the the browser and browser checks every few minutes if the session is valid and if not, refreshes the view to logged out view. How is this workflow usually implemented in Flask? I can pass session id when the application view is created, however how do you about authenticating session ids.

thanks for the heads up,


Flask mailing list  
Flask at python.org  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20150820/5354ab9d/attachment.html>

More information about the Flask mailing list