diff --git a/src/forest/auth/routes.py b/src/forest/auth/routes.py index 7a6f363..3803654 100644 --- a/src/forest/auth/routes.py +++ b/src/forest/auth/routes.py @@ -16,7 +16,7 @@ import pyqrcode @auth.route('/authorize/') def oauth2_authorize(provider): if not current_user.is_anonymous: - return redirect(url_for('index')) + return redirect(url_for('main.index')) provider_data = current_app.config['OAUTH2_PROVIDERS'].get(provider) if provider_data is None: @@ -41,7 +41,7 @@ def oauth2_authorize(provider): @auth.route('/callback/') def oauth2_callback(provider): if not current_user.is_anonymous: - return redirect(url_for('index')) + return redirect(url_for('main.index')) provider_data = current_app.config['OAUTH2_PROVIDERS'].get(provider) if provider_data is None: @@ -52,7 +52,7 @@ def oauth2_callback(provider): for k, v in request.args.items(): if k.startswith('error'): flash(f'{k}: {v}') - return redirect(url_for('index')) + return redirect(url_for('main.index')) # make sure that the state parameter matches the one we created in the # authorization request