@auth.route('/verify', methods=['GET', 'POST'])
@login_required
def verify():
    form = VerifyForm(request.form)
    user = User.query.get(session['user_id'])

    # Send a token to our user when they GET this page
    if request.method == 'GET':
        send_authy_token_request(user.authy_id)

    if form.validate_on_submit():
        user_entered_code = form.verification_code.data

        verified = verify_authy_token(user.authy_id, str(user_entered_code))
        if verified.ok():
            user.authy_status = 'approved'
            db.session.add(user)
            db.session.commit()

            flash("You're logged in! Thanks for using two factor verification.", 'success')
            return redirect(url_for('main.account'))
        else:
            form.errors['verification_code'] = ['Code invalid - please try again.']

    return render_template('verify.html', form=form)
Powers token validation (not using OneTouch)
dataset/ETHPy150Open TwilioDevEd/authy2fa-flask/twofa/auth/views.py/verify