lingthio / Flask-User

Customizable User Authorization & User Management: Register, Confirm, Login, Change username/password, Forgot password and more.
http://flask-user.readthedocs.io/
MIT License
1.05k stars 291 forks source link

Issue in get_id when using external authentication #299

Open asyd opened 4 years ago

asyd commented 4 years ago

Hello folks,

I want to use flask-user with internal authentication but also with flask-oidc.

However, when I proceed to login_user it failed with:

  File "/home/asyd/.cache/pypoetry/virtualenvs/timetracking-oW1qtLzd-py3.7/lib/python3.7/site-packages/flask_user/user_mixin.py", line 26, in get_id
    password_ends_with = '' if user_manager.USER_ENABLE_AUTH0 else self.password[-8:]

And if I enable AUTH0 I have some other issues.

So maybe we can add an extra setting in this test? Or maybe generate a random string if the password is empty?

What do you think?

According your feedback I'll try to submit a PR.

Thanks

asyd commented 4 years ago

Any news by chance? I need a fix for that before release a software. Thanks!