@account.before_app_request
def before_request():
    if current_user.is_authenticated() \
            and not current_user.confirmed \
            and request.endpoint[:8] != 'account.' \
            and request.endpoint != 'static':
        return redirect(url_for('account.unconfirmed'))
Force user to confirm email before accessing login-required routes.
dataset/ETHPy150Open hack4impact/flask-base/app/account/views.py/before_request