diff --git a/example/app.py b/example/app.py index 0bf4b3f..f67baf1 100644 --- a/example/app.py +++ b/example/app.py @@ -56,17 +56,6 @@ def create_app(auth_config): def index(): return render_template('index.html', content='Home Page') - @app.route('/login') - def login(): - if app.config['SECURITY_PASSWORDLESS']: - form = PasswordlessLoginForm() - template = 'passwordless_login' - else: - form = LoginForm() - template = 'login' - - return render_template(template + '.html', content='Login Page', form=form) - @app.route('/custom_login') def custom_login(): return render_template('login.html', content='Custom Login Page', form=LoginForm()) diff --git a/example/templates/_nav.html b/example/templates/_nav.html index 7dd1347..4c71709 100644 --- a/example/templates/_nav.html +++ b/example/templates/_nav.html @@ -14,7 +14,7 @@ {%- if current_user.is_authenticated() -%} Log out {%- else -%} - Log in + Log in {%- endif -%} \ No newline at end of file diff --git a/flask_security/core.py b/flask_security/core.py index b810ac1..07986ef 100644 --- a/flask_security/core.py +++ b/flask_security/core.py @@ -37,6 +37,7 @@ _default_config = { 'PASSWORD_SALT': None, 'PASSWORD_HMAC': False, 'AUTH_URL': '/auth', + 'LOGIN_URL': '/login', 'LOGOUT_URL': '/logout', 'REGISTER_URL': '/register', 'RESET_URL': '/reset', diff --git a/flask_security/templates/security/login.html b/flask_security/templates/security/login.html index 9d9c26f..2e171cd 100644 --- a/flask_security/templates/security/login.html +++ b/flask_security/templates/security/login.html @@ -1,7 +1,7 @@ {% from "security/_macros.html" import render_field_with_errors, render_field %} {% include "security/_messages.html" %}