diff --git a/src/forest/auth/routes.py b/src/forest/auth/routes.py index 261bd39..c834bf7 100644 --- a/src/forest/auth/routes.py +++ b/src/forest/auth/routes.py @@ -14,6 +14,7 @@ from models import db, User from io import BytesIO import pyqrcode +import sys @auth.route('/authorize/') def oauth2_authorize(provider): @@ -74,7 +75,7 @@ def oauth2_callback(provider): 'code': request.args['code'], 'grant_type': 'authorization_code', 'redirect_uri': url_for('auth.oauth2_callback', provider=provider, - _external=True), + _external=True, _scheme='https'), }, headers={'Accept': 'application/json'}) if response.status_code != 200: print('oauth response code is not 200', file=sys.stderr)