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.06k stars 294 forks source link

invite_app.py example not working #276

Open johschmitz opened 4 years ago

johschmitz commented 4 years ago

I was trying to run the invite_app.py example but it throws an error:

$ python3 invite_app.py
Traceback (most recent call last):
  File "invite_app.py", line 5, in <module>
    from flask_user import confirmed_email_required, utils, login_required, \
ImportError: cannot import name 'confirmed_email_required'

It seems the @confirmed_email_required decorator in Flask-User/flask_user/decorators.py is completely missing even if there is a comment that says

This module defines Flask-User decorators
such as [...] and @confirmed_email_required.
Chaostheorie commented 4 years ago

This decorator is indeed missing in the file. Maybe considering changing the routes hat are allowed for unconfirmed emails with flask_user.decorators.allow_unconfirmed_email?

harisbal commented 3 years ago

It seems that a lot have changed in the API since the initial release of this file. The mechanism to send invitations is extremely useful and it would be very nice to have an updated version :)