()
return redirect(url_for('.reset_pick_password'))
Endpoint for password reset emails, which validates the token
    and UID pair, then redirects to the password set form.
Endpoint for password reset emails, which validates the token
    and UID pair, then redirects to the password set form.
Endpoint for password reset emails which validates the token and UID pair then redirects to the password set form .
def reset_password():
    """
    Endpoint for password reset emails, which validates the token
    and UID pair, then redirects to the password set form.
    """
    token = request.args.get('token')
    uid = request.args.get('uid')

    u = User.query.get(int(uid))
    if not u or not reset.valid_token(u, token):
        flash('Your reset request is invalid or expired.', category='warning')
        return redirect(url_for('.login'))

    session['reset_token'] = token
    session['reset_user_id'] = uid

    return redirect(url_for('.reset_pick_password'))
def reset_password ( ) : token = request . args . get ( 'token' ) uid = request . args . get ( 'uid' ) u = User . query . get ( int ( uid ) ) if not u or not reset . valid_token ( u , token ) : flash ( 'Your reset request is invalid or expired.' , category = 'warning' ) return redirect ( url_for ( '.login' ) ) session [ 'reset_token' ] = token session [ 'reset_user_id' ] = uid return redirect ( url_for ( '.reset_pick_password' ) )