pallets-eco / flask-security

Quick and simple security for Flask applications
MIT License
1.63k stars 513 forks source link

Flask-Login dependency #856

Open rprinsloo opened 4 years ago

rprinsloo commented 4 years ago

Flask-Login has released v0.5.0 on 2020-02-09.

This release has broken some of the decorators (all I have encountered, but not necessarily exclusive to decorators).

File "/usr/local/lib/python3.6/site-packages/flask_security/decorators.py", line 61, in _check_token
    user = _security.login_manager.request_callback(request)
AttributeError: 'LoginManager' object has no attribute 'request_callback'

A more specific version check might be needed: https://github.com/mattupstate/flask-security/blob/develop/setup.py#L50

For those having the same issue add a fixed dependency to Flask-Login <= 0.5.0 e.g.:

Flask-Login==0.4.1

(0.4.1 was the greatest version < 0.5.0 at the time of writing)

I will check back with more details (and further testing) once I find time and perhaps submit a PR.

alanhamlett commented 4 years ago

Fixed by using the new method name in #858.