mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-07-11 23:23:18 +00:00
Switch from Authlib to pyJWT
This commit is contained in:
@ -91,7 +91,7 @@ def register():
|
||||
db.session.rollback()
|
||||
flash('Internal Server Error', category='error')
|
||||
abort(500)
|
||||
token = user.generate_confirmation_token()
|
||||
token = user.generate_confirm_user_token()
|
||||
msg = create_message(
|
||||
user.email,
|
||||
'Confirm Your Account',
|
||||
@ -115,7 +115,7 @@ def register():
|
||||
def confirm(token):
|
||||
if current_user.confirmed:
|
||||
return redirect(url_for('main.dashboard'))
|
||||
if current_user.confirm(token):
|
||||
if current_user.confirm_user(token):
|
||||
db.session.commit()
|
||||
flash('You have confirmed your account')
|
||||
return redirect(url_for('main.dashboard'))
|
||||
@ -139,7 +139,7 @@ def unconfirmed():
|
||||
@bp.route('/confirm')
|
||||
@login_required
|
||||
def resend_confirmation():
|
||||
token = current_user.generate_confirmation_token()
|
||||
token = current_user.generate_confirm_user_token()
|
||||
msg = create_message(
|
||||
current_user.email,
|
||||
'Confirm Your Account',
|
||||
@ -160,7 +160,7 @@ def reset_password_request():
|
||||
if form.validate_on_submit():
|
||||
user = User.query.filter_by(email=form.email.data.lower()).first()
|
||||
if user is not None:
|
||||
token = user.generate_reset_token()
|
||||
token = user.generate_password_reset_token()
|
||||
msg = create_message(
|
||||
user.email,
|
||||
'Reset Your Password',
|
||||
|
Reference in New Issue
Block a user