pallets-eco / flask-security

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

SQLAlchemyUserDatastore.get_user should use get with uuid's #838

Open cancan101 opened 5 years ago

cancan101 commented 5 years ago

Currently get is used only for numerics rather than also for a UUID pk: https://github.com/mattupstate/flask-security/blob/3e15d06ee82a728d5cc53059fb28406c7bc6e7aa/flask_security/datastore.py#L242-L243

jwag956 commented 5 years ago

I believe the #633 actually solves this. That being said - it appears there are numerous issues with simply trying different columns and looking for a match. Question - can you share your UserModel - did you change the PK from an Integer type to string? or did you just add a new field?

jwag956 commented 5 years ago

This has been fixed and merged in https://github.com/jwag956/flask-security in 3.1.0rc1 This is available at https://pypi.org/project/Flask-Security-Too/#history