vendredi 6 février 2015

What's the relationship between flask-login and flask-security?


I've gone through the documentation for flask-login and flask-security.


Both modules appear to be related. Flask-security makes reference to flask-login, so it would appear that they can work together. There are some areas where the two provide complementary features (e.g. flask-security provides user registration and flask-login does not).


However, there are other areas where the features overlap. For example, both modules provide a login_user() function, so it's unclear which one should be used if both modules are used together.


My question is: how should I think about the relationship between the two modules? For example:



  • One depends on the other (e.g. flask-login extends/is built on top of flask-security)

  • The two are entirely separate (no dependencies)

  • The two are separate but are designed to work together (in which case, how does one resolve which of the overlapping functions such as login_user() to use).


BTW I think this is a very common question for flask developers. I tried asking this on StackOverflow but the question got put on hold as too general. Am hoping the community here will be more focused on answering real questions than on pedantic moderation.





Aucun commentaire:

Enregistrer un commentaire