Flask user authentication

pocorschi picture pocorschi · Aug 7, 2011 · Viewed 39.9k times · Source

I have an application that will use flask and mongodb; I will probably host it on rackspace.

I need to understand how flask authenticating works. I have not found much information on the subject. Is there a complete tutorial on how to roll your own solution? If not, I certainly would like to hear some thoughts on how you would approach it for a a flask app.

Big PS:

I just thought about it. I also need to open a real API. A part of that API will be used for AJAX on the front end. How do i secure that part of the app?

Can anyone explain API auth requests?

Answer

mdeous picture mdeous · Aug 7, 2011

I would suggest using the flask-login extension, it makes session management really easy to add to your flask application, and provides a nice documentation which covers in details every aspect of the extension.