r/Python • • Feb 24 '14

The Flask Authentication Problem

https://stormpath.com/blog/part-one-flask-authentication-problem
0 Upvotes

18 comments sorted by

View all comments

5

u/[deleted] Feb 24 '14

There are many examples floating around on the internet (just Google Flask + authentication and you’ll see a few) which explain how to do the following:

If you actually cut that down to the database-agnostic part, you get this:

  1. use bcrypt to hash/check passwords;

  2. use flask.session to mark the client as logged in.

Everything else? Totally unrelated, especially the HTTPS "problem" (encryption is configured in the web server, not in the WSGI app.)

0

u/[deleted] Feb 24 '14

[deleted]

1

u/mercnet Feb 25 '14

Can you elaborate more on Flask-Security being too unconfigurable? I just started using it and wondering what options are missing from it?

0

u/[deleted] Feb 25 '14

[deleted]

1

u/mercnet Feb 25 '14

You can easily change the template path and filenames: https://pythonhosted.org/Flask-Security/configuration.html#template-paths

It doesn't look like you can change the directory name for emails. You can always request it at https://github.com/mattupstate/flask-security/issues?state=open

1

u/solid_steel Feb 25 '14

All those things that you mention in the first sentence are not related to authentication. That's the whole beauty of Flask - you get to get your hands dirty by building things at a basic level. If you require more magic ie. registration emails, consider shifting over to Rails and the excellent Devise gem.