Flask-Middleware / flask-security

Quick and simple security for Flask applications
MIT License
622 stars 154 forks source link

Some dependencies are creating problems. WebAuthn #967

Closed Koladweep closed 2 months ago

Koladweep commented 2 months ago

I installed the following missing dependencies setuptools and webauthn, going for the latest versions as the exact dependencies were not known to me (webauthn (2.1.0) and setuptools(63))

after that, the package isn't working for me.

raise exc.InvalidRequestError( sqlalchemy.exc.InvalidRequestError: When initializing mapper Mapper[User(user)], expression 'WebAuthn' failed to locate a name ('WebAuthn'). If this is a class name, consider adding this relationship() to the <class 'main.User'> class after both dependent classes have been defined.

For the sake of issue reproduction I have attached the requirements.txt file (pip freeze> requirements.txt)

requirements.txt

jwag956 commented 2 months ago

The installation section has details on additional packages you might need - and flask-security has pip 'extras' that will install those if you want (including webauthn).

You need a webauthn model properly tied into your User model - please see the documentation on Models for details.

Koladweep commented 2 months ago

Sure. Thanks for responding.