fix auth.route

This commit is contained in:
deflax 2024-04-06 17:07:05 +03:00
parent 02bf209215
commit c05e2f77f3

View file

@ -13,7 +13,7 @@ from models import db, User
from io import BytesIO
import pyqrcode
@app.route('/authorize/<provider>')
@auth.route('/authorize/<provider>')
def oauth2_authorize(provider):
if not current_user.is_anonymous:
return redirect(url_for('index'))
@ -38,7 +38,7 @@ def oauth2_authorize(provider):
# redirect the user to the OAuth2 provider authorization URL
return redirect(provider_data['authorize_url'] + '?' + qs)
@app.route('/callback/<provider>')
@auth.route('/callback/<provider>')
def oauth2_callback(provider):
if not current_user.is_anonymous:
return redirect(url_for('index'))