diff --git a/app/views.py b/app/views.py index 09071f1..083c659 100644 --- a/app/views.py +++ b/app/views.py @@ -387,7 +387,10 @@ def logout(): session.pop('google_token', None) session.clear() logout_user() - return redirect(url_for('login')) + if app.config.get('SAML_LOGOUT_REDIRECT'): + return redirect(app.config.get('SAML_LOGOUT_REDIRECT')) + else: + return redirect(url_for('login')) @app.route('/dashboard', methods=['GET', 'POST']) diff --git a/config_template.py b/config_template.py index 0e79766..c08f2e4 100644 --- a/config_template.py +++ b/config_template.py @@ -92,6 +92,8 @@ SAML_METADATA_CACHE_LIFETIME = 1 SAML_SP_ENTITY_ID = 'http://' SAML_SP_CONTACT_NAME = '' SAML_SP_CONTACT_MAIL = '' +## uncomment to redirect to the given URL on logout +# SAML_LOGOUT_REDIRECT = 'https:///logout' #Default Auth BASIC_ENABLED = True