fix auth.route
This commit is contained in:
parent
02bf209215
commit
c05e2f77f3
|
@ -13,7 +13,7 @@ from models import db, User
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
import pyqrcode
|
import pyqrcode
|
||||||
|
|
||||||
@app.route('/authorize/<provider>')
|
@auth.route('/authorize/<provider>')
|
||||||
def oauth2_authorize(provider):
|
def oauth2_authorize(provider):
|
||||||
if not current_user.is_anonymous:
|
if not current_user.is_anonymous:
|
||||||
return redirect(url_for('index'))
|
return redirect(url_for('index'))
|
||||||
|
@ -38,7 +38,7 @@ def oauth2_authorize(provider):
|
||||||
# redirect the user to the OAuth2 provider authorization URL
|
# redirect the user to the OAuth2 provider authorization URL
|
||||||
return redirect(provider_data['authorize_url'] + '?' + qs)
|
return redirect(provider_data['authorize_url'] + '?' + qs)
|
||||||
|
|
||||||
@app.route('/callback/<provider>')
|
@auth.route('/callback/<provider>')
|
||||||
def oauth2_callback(provider):
|
def oauth2_callback(provider):
|
||||||
if not current_user.is_anonymous:
|
if not current_user.is_anonymous:
|
||||||
return redirect(url_for('index'))
|
return redirect(url_for('index'))
|
||||||
|
|
Loading…
Reference in a new issue