[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1032824: unblock: flask-security/5.1.1-1



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
X-Debbugs-Cc: flask-security@packages.debian.org
Control: affects -1 + src:flask-security

Please unblock package flask-security

[ Reason ]
Upstream did release a version 5.1.1 which fixes some issues which were
visible and detected since the release of 5.1.0. Some usual non critical
updates are also incorporated.

From the changelog entry for 5.1.1
https://github.com/Flask-Middleware/flask-security/blob/master/CHANGES.rst#fixes-1

Fixes

    (:issue:`740`) Fix 2 Flask apps in same thread with USERNAME_ENABLE set. There was a too aggressive config check.
    (:pr:`739`) Update Russian translations. (ademaro)
    (:pr:`743`) Run all templates through a linter. (ademaro)
    (:pr:`757`) Fix json/flask backwards compatibility hack.
    (:issue:`759`) Fix quickstarts - make sure they run using flask run
    (:pr:`755`) Fix unified signup when two-factor not enabled. (sebdroid)
    (:pr:`763`) Add dependency on setuptools (pkg_resources). (hroncok)

[ Impact ]
The Flask AddOn might behave unexpected without the added fixes.

[ Tests ]
The source package does not have autopkgtests right now, this requires a
real PostgreSQL database setup.
Some basic local testing did happen and this succeeded successful.
Also the upstream tests by GitHub actions did run successful.
https://github.com/Flask-Middleware/flask-security/actions/runs/4305707632

[ Risks ]
There is a quite low risk. The only affected package is the binary
package itself if some regression is happen.

Tough the debdiff is long in terms of modified files, the changes itself
are rather small. The modifications to the HTML templates are most of
the modifications that did happen, but nearly all of them are code
reformatting.

[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing

unblock flask-security/5.1.1-1

diff -Nru flask-security-5.1.0/CHANGES.rst flask-security-5.1.1/CHANGES.rst
--- flask-security-5.1.0/CHANGES.rst	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/CHANGES.rst	2023-03-01 20:12:52.000000000 +0100
@@ -3,6 +3,23 @@
 
 Here you can see the full list of changes between each Flask-Security release.
 
+Version 5.1.1
+-------------
+
+Released March 1, 2023
+
+Fixes
++++++
+
+- (:issue:`740`) Fix 2 Flask apps in same thread with USERNAME_ENABLE set.
+  There was a too aggressive config check.
+- (:pr:`739`) Update Russian translations. (ademaro)
+- (:pr:`743`) Run all templates through a linter. (ademaro)
+- (:pr:`757`) Fix json/flask backwards compatibility hack.
+- (:issue:`759`) Fix quickstarts - make sure they run using `flask run`
+- (:pr:`755`) Fix unified signup when two-factor not enabled. (sebdroid)
+- (:pr:`763`) Add dependency on setuptools (pkg_resources). (hroncok)
+
 Version 5.1.0
 -------------
 
diff -Nru flask-security-5.1.0/debian/changelog flask-security-5.1.1/debian/changelog
--- flask-security-5.1.0/debian/changelog	2023-02-05 15:21:24.000000000 +0100
+++ flask-security-5.1.1/debian/changelog	2023-03-05 13:43:26.000000000 +0100
@@ -1,3 +1,10 @@
+flask-security (5.1.1-1) unstable; urgency=medium
+
+  * Team upload.
+  * New upstream version 5.1.1
+
+ -- Carsten Schoenert <c.schoenert@t-online.de>  Sun, 05 Mar 2023 13:43:26 +0100
+
 flask-security (5.1.0-1) unstable; urgency=medium
 
   * Team upload.
diff -Nru flask-security-5.1.0/.djlintrc flask-security-5.1.1/.djlintrc
--- flask-security-5.1.0/.djlintrc	1970-01-01 01:00:00.000000000 +0100
+++ flask-security-5.1.1/.djlintrc	2023-03-01 20:12:52.000000000 +0100
@@ -0,0 +1,11 @@
+{
+    "ignore": "H005,H006,H017,H025,H030,H031",
+    "extension": "html",
+    "indent": "2",
+    "profile": "jinja",
+    "format_attribute_template_tags": "true",
+    "max_line_length": 120,
+    "max_attribute_length": 240,
+    "blank_line_after_tag": "from,endmacro",
+    "blank_line_before_tag": "block,extends"
+}
diff -Nru flask-security-5.1.0/docs/conf.py flask-security-5.1.1/docs/conf.py
--- flask-security-5.1.0/docs/conf.py	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/docs/conf.py	2023-03-01 20:12:52.000000000 +0100
@@ -57,7 +57,7 @@
 # built documents.
 #
 # The short X.Y version.
-version = "5.1.0"
+version = "5.1.1"
 # The full version, including alpha/beta/rc tags.
 release = version
 
diff -Nru flask-security-5.1.0/docs/quickstart.rst flask-security-5.1.1/docs/quickstart.rst
--- flask-security-5.1.0/docs/quickstart.rst	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/docs/quickstart.rst	2023-03-01 20:12:52.000000000 +0100
@@ -14,7 +14,7 @@
 
 .. note::
     The default ``SECURITY_PASSWORD_HASH`` is "bcrypt" - so be sure to install bcrypt.
-    If you opt for a different hash e.g. "argon2" you will need to install e.g. `argon_cffi`_.
+    If you opt for a different hash e.g. "argon2" you will need to install the appropriate package e.g. `argon_cffi`_.
 .. danger::
    The examples below place secrets in source files. Never do this for your application
    especially if your source code is placed in a public repo. How you pass in secrets
@@ -108,15 +108,25 @@
     def home():
         return render_template_string("Hello {{ current_user.email }}")
 
+    # one time setup
+    with app.app_context():
+        # Create User to test with
+        db.create_all()
+        if not app.security.datastore.find_user(email="test@me.com"):
+            app.security.datastore.create_user(email="test@me.com", password=hash_password("password"))
+        db.session.commit()
+
     if __name__ == '__main__':
-        with app.app_context():
-            # Create User to test with
-            app.security.datastore.db.create_all()
-            if not app.security.datastore.find_user(email="test@me.com"):
-                app.security.datastore.create_user(email="test@me.com", password=hash_password("password"))
-            app.security.datastore.db.session.commit()
         app.run()
 
+You can run this either with::
+
+    flask run
+
+or::
+
+    python app.py
+
 .. _basic-sqlalchemy-application-with-session:
 
 Basic SQLAlchemy Application with session
@@ -171,13 +181,16 @@
     def home():
         return render_template_string('Hello {{email}} !', email=current_user.email)
 
+    # one time setup
+    with app.app_context():
+        # Create a user to test with
+        init_db()
+        if not app.security.datastore.find_user(email="test@me.com"):
+            app.security.datastore.create_user(email="test@me.com", password=hash_password("password"))
+        db_session.commit()
+
     if __name__ == '__main__':
-        with app.app_context():
-            # Create a user to test with
-            init_db()
-            if not app.security.datastore.find_user(email="test@me.com"):
-                app.security.datastore.create_user(email="test@me.com", password=hash_password("password"))
-            db_session.commit()
+        # run application (can also use flask run)
         app.run()
 
 - database.py ::
@@ -204,7 +217,6 @@
 
     from database import Base
     from flask_security import UserMixin, RoleMixin
-    from sqlalchemy import create_engine
     from sqlalchemy.orm import relationship, backref
     from sqlalchemy import Boolean, DateTime, Column, Integer, \
                         String, ForeignKey, UnicodeText
@@ -239,6 +251,14 @@
         roles = relationship('Role', secondary='roles_users',
                              backref=backref('users', lazy='dynamic'))
 
+You can run this either with::
+
+    flask run
+
+or::
+
+    python app.py
+
 .. _basic-mongoengine-application:
 
 Basic MongoEngine Application
@@ -257,7 +277,8 @@
 ~~~~~~~~~~~~~~~~~~~~~~~
 
 The following code sample illustrates how to get started as quickly as
-possible using MongoEngine:
+possible using MongoEngine (of course you have to install and start up a
+local MongoDB instance):
 
 ::
 
@@ -309,11 +330,14 @@
     def home():
         return render_template_string("Hello {{ current_user.email }}")
 
+    # one time setup
+    with app.app_context():
+        # Create a user to test with
+        if not app.security.datastore.find_user(email="test@me.com"):
+            app.security.datastore.create_user(email="test@me.com", password=hash_password("password"))
+
     if __name__ == '__main__':
-        with app.app_context():
-            # Create a user to test with
-            if not app.security.datastore.find_user(email="test@me.com"):
-                app.security.datastore.create_user(email="test@me.com", password=hash_password("password"))
+        # run application (can also use flask run)
         app.run()
 
 
@@ -401,15 +425,16 @@
     def home():
         return render_template_string("Hello {{ current_user.email }}")
 
-    if __name__ == '__main__':
-        with app.app_context():
-            # Create a user to test with
-            for Model in (Role, User, UserRoles):
-                Model.drop_table(fail_silently=True)
-                Model.create_table(fail_silently=True)
-            if not app.security.datastore.find_user(email="test@me.com"):
-                app.security.datastore.create_user(email="test@me.com", password=hash_password("password"))
+    # one time setup
+    with app.app_context():
+        # Create a user to test with
+        for Model in (Role, User, UserRoles):
+            Model.drop_table(fail_silently=True)
+            Model.create_table(fail_silently=True)
+        if not app.security.datastore.find_user(email="test@me.com"):
+            app.security.datastore.create_user(email="test@me.com", password=hash_password("password"))
 
+    if __name__ == '__main__':
         app.run()
 
 
diff -Nru flask-security-5.1.0/docs/_static/openapi_view.html flask-security-5.1.1/docs/_static/openapi_view.html
--- flask-security-5.1.0/docs/_static/openapi_view.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/docs/_static/openapi_view.html	2023-03-01 20:12:52.000000000 +0100
@@ -2,6 +2,7 @@
   <html>
   <head>
     <meta charset="utf-8"> <!-- Important: rapi-doc uses utf8 charecters -->
+    <title>API</title>
     <script src="https://unpkg.com/rapidoc/dist/rapidoc-min.js";></script>
   </head>
   <body>
@@ -16,6 +17,7 @@
       <img
         slot="logo"
         src="logo-owl-68.png"
+        alt="logo"
       />
     </rapi-doc>
   </body>
diff -Nru flask-security-5.1.0/docs/two_factor_configurations.rst flask-security-5.1.1/docs/two_factor_configurations.rst
--- flask-security-5.1.0/docs/two_factor_configurations.rst	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/docs/two_factor_configurations.rst	2023-03-01 20:12:52.000000000 +0100
@@ -108,14 +108,15 @@
     def home():
         return render_template_string("Hello {{ current_user.email }}")
 
-    if __name__ == '__main__':
-        with app.app_context():
-            # Create a user to test with
-            db.create_all()
-            if not app.security.datastore.find_user(email='test@me.com'):
-                app.security.datastore.create_user(email='test@me.com', password='password')
-            db.session.commit()
+    # one time setup
+    with app.app_context():
+        # Create a user to test with
+        db.create_all()
+        if not app.security.datastore.find_user(email='test@me.com'):
+            app.security.datastore.create_user(email='test@me.com', password='password')
+        db.session.commit()
 
+    if __name__ == '__main__':
         app.run()
 
 Adding SMS
diff -Nru flask-security-5.1.0/flask_security/core.py flask-security-5.1.1/flask_security/core.py
--- flask-security-5.1.0/flask_security/core.py	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/core.py	2023-03-01 20:12:52.000000000 +0100
@@ -1177,7 +1177,6 @@
         oauth: t.Optional["OAuth"] = None,
         **kwargs: t.Any,
     ):
-
         # to be nice and hopefully avoid backwards compat issues - we still accept
         # kwargs - but we don't do anything with them. If caller sends in some -
         # output a deprecation warning
@@ -1185,6 +1184,7 @@
             warnings.warn(
                 "kwargs passed to the constructor are now ignored",
                 DeprecationWarning,
+                stacklevel=4,
             )
         self.app = app
         self._datastore = datastore
@@ -1461,6 +1461,7 @@
                 " and will be removed in the future. Please use the Unified Signin"
                 " feature instead.",
                 DeprecationWarning,
+                stacklevel=2,
             )
         if cv("USERNAME_ENABLE", app):
             if hasattr(self.datastore, "user_model") and not hasattr(
@@ -1470,20 +1471,6 @@
                     "User model must contain 'username' if"
                     " SECURITY_USERNAME_ENABLE is True"
                 )
-            # if they want USERNAME_ENABLE - then they better not have defined
-            # username in their own forms
-            if any(
-                hasattr(self.forms[f].cls, "username")
-                for f in [
-                    "register_form",
-                    "confirm_register_form",
-                    "login_form",
-                ]
-            ):  # pragma: no cover
-                raise ValueError(
-                    "Your login_form or register_form has a"
-                    " 'username' attribute already"
-                )
             # if not already listed in user identity attributes, add it at the end
             uialist = []
             for uia in cv("USER_IDENTITY_ATTRIBUTES", app=app):
@@ -1569,7 +1556,8 @@
                 warnings.warn(
                     "'sms' was enabled in SECURITY_US_ENABLED_METHODS;"
                     " however 'us_phone_number' not configured in"
-                    " SECURITY_USER_IDENTITY_ATTRIBUTES"
+                    " SECURITY_USER_IDENTITY_ATTRIBUTES",
+                    stacklevel=2,
                 )
         if cv("TWO_FACTOR", app=app):
             alt_auth = True
@@ -1884,6 +1872,7 @@
             "'unauthorized_handler' has been replaced with"
             " 'unauthz_handler' and 'unauthn_handler'",
             DeprecationWarning,
+            stacklevel=2,
         )
         self._unauthorized_callback = cb
 
diff -Nru flask-security-5.1.0/flask_security/datastore.py flask-security-5.1.1/flask_security/datastore.py
--- flask-security-5.1.0/flask_security/datastore.py	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/datastore.py	2023-03-01 20:12:52.000000000 +0100
@@ -765,7 +765,7 @@
         if cv("JOIN_USER_ROLES") and hasattr(self.user_model, "roles"):
             from sqlalchemy.orm import joinedload
 
-            query = query.options(joinedload(self.user_model.roles))
+            query = query.options(joinedload(self.user_model.roles))  # type: ignore
 
         if case_insensitive:
             # While it is of course possible to pass in multiple keys to filter on
diff -Nru flask-security-5.1.0/flask_security/forms.py flask-security-5.1.1/flask_security/forms.py
--- flask-security-5.1.0/flask_security/forms.py	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/forms.py	2023-03-01 20:12:52.000000000 +0100
@@ -641,7 +641,6 @@
 
 
 class RegisterForm(ConfirmRegisterForm, NextFormMixin):
-
     # Password optional when Unified Signin enabled.
     password_confirm = PasswordField(
         get_form_field_label("retype_password"),
diff -Nru flask-security-5.1.0/flask_security/__init__.py flask-security-5.1.1/flask_security/__init__.py
--- flask-security-5.1.0/flask_security/__init__.py	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/__init__.py	2023-03-01 20:12:52.000000000 +0100
@@ -6,7 +6,7 @@
     security via Flask-Login, Flask-Principal, Flask-WTF, and passlib.
 
     :copyright: (c) 2012-2019 by Matt Wright.
-    :copyright: (c) 2019-2022 by J. Christopher Wagner.
+    :copyright: (c) 2019-2023 by J. Christopher Wagner.
     :license: MIT, see LICENSE for more details.
 """
 
@@ -81,6 +81,7 @@
     user_authenticated,
     user_confirmed,
     user_registered,
+    user_not_registered,
     us_security_token_sent,
     us_profile_changed,
     wan_deleted,
@@ -133,4 +134,4 @@
 )
 from .webauthn_util import WebauthnUtil
 
-__version__ = "5.1.0"
+__version__ = "5.1.1"
diff -Nru flask-security-5.1.0/flask_security/json.py flask-security-5.1.1/flask_security/json.py
--- flask-security-5.1.0/flask_security/json.py	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/json.py	2023-03-01 20:12:52.000000000 +0100
@@ -1,18 +1,18 @@
 """
     Flask-Security JSON extensions.
 
-    :copyright: (c) 2022-2022 by J. Christopher Wagner (jwag).
+    :copyright: (c) 2022-2023 by J. Christopher Wagner (jwag).
     :license: MIT, see LICENSE for more details.
 
     Pieces of this code liberally copied from flask-mongoengine.
 """
 from flask import __version__ as flask_version
+from pkg_resources import parse_version
 
 
 def use_json_provider() -> bool:
     """Split Flask before 2.2.0 and after, to use/not use JSON provider approach."""
-    version = list(flask_version.split("."))
-    return int(version[0]) > 2 or (int(version[0]) == 2 and int(version[1]) > 1)
+    return parse_version(flask_version) >= parse_version("2.2.0")
 
 
 def _use_encoder(superclass):  # pragma: no cover
@@ -52,8 +52,6 @@
 def setup_json(app, bp=None):
     # Called at init_app time.
     if use_json_provider():
-        from flask import __version__
-
         app.json_provider_class = _use_provider(app.json_provider_class)
         app.json = app.json_provider_class(app)
         # a bit if a hack - if a package (e.g. flask-mongoengine) hasn't
@@ -61,10 +59,10 @@
         # to this specific version of Flask that happens to use _json_encoder to
         # signal if any app/extension has registered an old style encoder.
         # (app.json_encoder is always set)
-        # (If they do, then Flask 2.2.2 won't use json_provider at all)
+        # (If they do, then Flask 2.2.x won't use json_provider at all)
         # Of course if they do this AFTER we're initialized all bets are off.
-        if __version__ == "2.2.2":
-            if app._json_encoder:
+        if parse_version(flask_version) >= parse_version("2.2.0"):
+            if getattr(app, "_json_encoder", None):
                 app.json_encoder = _use_encoder(app.json_encoder)
 
     elif bp:  # pragma: no cover
diff -Nru flask-security-5.1.0/flask_security/models/fsqla.py flask-security-5.1.1/flask_security/models/fsqla.py
--- flask-security-5.1.0/flask_security/models/fsqla.py	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/models/fsqla.py	2023-03-01 20:12:52.000000000 +0100
@@ -12,18 +12,17 @@
 """
 
 import datetime
+from typing import cast
 from sqlalchemy import (
     Boolean,
     DateTime,
     Column,
     Integer,
     String,
-    UnicodeText,
     ForeignKey,
 )
 from sqlalchemy.ext.declarative import declared_attr
 from sqlalchemy.ext.mutable import MutableList
-from sqlalchemy.orm import relationship
 from sqlalchemy.sql import func
 
 from flask_security import AsaList, RoleMixin, UserMixin
@@ -91,7 +90,7 @@
     # Username is important since shouldn't expose email to other users in most cases.
     username = Column(String(255))
     password = Column(String(255), nullable=False)
-    active = Column(Boolean(), nullable=False)
+    active = cast(bool, Column(Boolean(), nullable=False))
 
     # Flask-Security user identifier
     fs_uniquifier = Column(String(64), unique=True, nullable=False)
@@ -129,55 +128,3 @@
         server_default=func.now(),
         onupdate=datetime.datetime.utcnow,
     )
-
-
-"""
-These are placeholders - not current used
-"""
-
-
-class FsOauth2ClientMixin:
-    """Oauth2 client"""
-
-    id = Column(String(64), primary_key=True)
-
-    @declared_attr
-    def user_id(cls):
-        return Column(
-            Integer, ForeignKey("user.id", ondelete="CASCADE"), nullable=False
-        )
-
-    @declared_attr
-    def user(cls):
-        return relationship("User")
-
-    grant_type = Column(String(32), nullable=False)
-    scopes = Column(UnicodeText(), default="")
-    response_type = Column(UnicodeText, nullable=False, default="")
-    redirect_uris = Column(UnicodeText())
-
-
-class FsTokenMixin:
-    """(Bearer) Tokens that have been given out"""
-
-    id = Column(Integer, primary_key=True)
-
-    @declared_attr
-    def client_id(cls):
-        return Column(
-            Integer, ForeignKey("oauth2_client.id", ondelete="CASCADE"), nullable=False
-        )
-
-    # client = relationship("fs_oauth2_client")
-    @declared_attr
-    def user_id(cls):
-        return Column(
-            Integer, ForeignKey("user.id", ondelete="CASCADE"), nullable=False
-        )
-
-    scopes = Column(UnicodeText(), default="")
-    revoked = Column(Boolean(), nullable=False, default=False)
-    access_token = Column(String(100), unique=True, nullable=False)
-    refresh_token = Column(String(100), unique=True)
-    issued_at = Column(type_=DateTime, nullable=False, server_default=func.now())
-    expires_at = Column(DateTime())
diff -Nru flask-security-5.1.0/flask_security/oauth_glue.py flask-security-5.1.1/flask_security/oauth_glue.py
--- flask-security-5.1.0/flask_security/oauth_glue.py	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/oauth_glue.py	2023-03-01 20:12:52.000000000 +0100
@@ -144,13 +144,15 @@
     using app.security.oauthglue.register_provider().
 
     See `Flask OAuth Client <https://docs.authlib.org/en/latest/client/flask.html>`_
+
+    .. versionadded:: 5.1.0
     """
 
     def __init__(self, app: "flask.Flask", oauthapp: t.Optional["OAuth"] = None):
         if not oauthapp:
             oauthapp = OAuth(app)
         self.oauth = oauthapp
-        self.providers: t.Dict[str, t.Dict[str, "CbType"]] = dict()
+        self.providers: t.Dict[str, t.Dict[str, CbType]] = dict()
         if cv("OAUTH_BUILTIN_PROVIDERS", app=app):
             for provider in cv("OAUTH_BUILTIN_PROVIDERS", app=app):
                 if provider == "github":
@@ -198,7 +200,7 @@
         self,
         name: str,
         registration_info: t.Optional[t.Dict[str, t.Any]],
-        fetch_identity_cb: "CbType",
+        fetch_identity_cb: CbType,
     ) -> None:
         """Add a provider to the list.
 
diff -Nru flask-security-5.1.0/flask_security/templates/security/base.html flask-security-5.1.1/flask_security/templates/security/base.html
--- flask-security-5.1.0/flask_security/templates/security/base.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/base.html	2023-03-01 20:12:52.000000000 +0100
@@ -7,7 +7,7 @@
     <title>{% block title %}{{ title|default }}{% endblock title %}</title>
 
       {%- block metas %}
-      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
       {%- endblock metas %}
 
       {%- block head_scripts %}
diff -Nru flask-security-5.1.0/flask_security/templates/security/change_password.html flask-security-5.1.1/flask_security/templates/security/change_password.html
--- flask-security-5.1.0/flask_security/templates/security/change_password.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/change_password.html	2023-03-01 20:12:52.000000000 +0100
@@ -2,17 +2,17 @@
 {% from "security/_macros.html" import render_field_with_errors, render_field %}
 
 {% block content %}
-{% include "security/_messages.html" %}
-<h1>{{ _fsdomain('Change password') }}</h1>
-<form action="{{ url_for_security('change_password') }}" method="POST" name="change_password_form">
-  {{ change_password_form.hidden_tag() }}
-  {% if active_password %}
-    {{ render_field_with_errors(change_password_form.password) }}
-  {% else %}
-    <h3>{{ _fsdomain('You do not currently have a password - this will add one.') }}</h3>
-  {% endif %}
-  {{ render_field_with_errors(change_password_form.new_password) }}
-  {{ render_field_with_errors(change_password_form.new_password_confirm) }}
-  {{ render_field(change_password_form.submit) }}
-</form>
-{% endblock %}
+  {% include "security/_messages.html" %}
+  <h1>{{ _fsdomain('Change password') }}</h1>
+  <form action="{{ url_for_security('change_password') }}" method="post" name="change_password_form">
+    {{ change_password_form.hidden_tag() }}
+    {% if active_password %}
+      {{ render_field_with_errors(change_password_form.password) }}
+    {% else %}
+      <h3>{{ _fsdomain('You do not currently have a password - this will add one.') }}</h3>
+    {% endif %}
+    {{ render_field_with_errors(change_password_form.new_password) }}
+    {{ render_field_with_errors(change_password_form.new_password_confirm) }}
+    {{ render_field(change_password_form.submit) }}
+  </form>
+{% endblock content %}
diff -Nru flask-security-5.1.0/flask_security/templates/security/email/change_notice.html flask-security-5.1.1/flask_security/templates/security/email/change_notice.html
--- flask-security-5.1.0/flask_security/templates/security/email/change_notice.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/email/change_notice.html	2023-03-01 20:12:52.000000000 +0100
@@ -1,4 +1,6 @@
 <p>{{ _fsdomain('Your password has been changed.') }}</p>
 {% if security.recoverable %}
-<p>{{ _fsdomain('If you did not change your password,') }} <a href="{{ url_for_security('forgot_password', _external=True) }}">{{ _fsdomain('click here to reset it') }}</a>.</p>
+  <p>
+    {{ _fsdomain('If you did not change your password,') }} <a href="{{ url_for_security('forgot_password', _external=True) }}">{{ _fsdomain('click here to reset it') }}</a>.
+  </p>
 {% endif %}
diff -Nru flask-security-5.1.0/flask_security/templates/security/email/confirmation_instructions.html flask-security-5.1.1/flask_security/templates/security/email/confirmation_instructions.html
--- flask-security-5.1.0/flask_security/templates/security/email/confirmation_instructions.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/email/confirmation_instructions.html	2023-03-01 20:12:52.000000000 +0100
@@ -6,5 +6,6 @@
   security - the Flask-Security configuration
 #}
 <p>{{ _fsdomain('Please confirm your email through the link below:') }}</p>
-
-<p><a href="{{ confirmation_link }}">{{ _fsdomain('Confirm my account') }}</a></p>
+<p>
+  <a href="{{ confirmation_link }}">{{ _fsdomain('Confirm my account') }}</a>
+</p>
diff -Nru flask-security-5.1.0/flask_security/templates/security/email/login_instructions.html flask-security-5.1.1/flask_security/templates/security/email/login_instructions.html
--- flask-security-5.1.0/flask_security/templates/security/email/login_instructions.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/email/login_instructions.html	2023-03-01 20:12:52.000000000 +0100
@@ -1,5 +1,5 @@
 <p>{{ _fsdomain('Welcome %(email)s!', email=user.email) }}</p>
-
 <p>{{ _fsdomain('You can log into your account through the link below:') }}</p>
-
-<p><a href="{{ login_link }}">{{ _fsdomain('Login now') }}</a></p>
+<p>
+  <a href="{{ login_link }}">{{ _fsdomain('Login now') }}</a>
+</p>
diff -Nru flask-security-5.1.0/flask_security/templates/security/email/reset_instructions.html flask-security-5.1.1/flask_security/templates/security/email/reset_instructions.html
--- flask-security-5.1.0/flask_security/templates/security/email/reset_instructions.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/email/reset_instructions.html	2023-03-01 20:12:52.000000000 +0100
@@ -5,4 +5,6 @@
   user - the entire user model object
   security - the Flask-Security configuration
 #}
-<p><a href="{{ reset_link }}">{{ _fsdomain('Click here to reset your password') }}</a></p>
+<p>
+  <a href="{{ reset_link }}">{{ _fsdomain('Click here to reset your password') }}</a>
+</p>
diff -Nru flask-security-5.1.0/flask_security/templates/security/email/two_factor_instructions.html flask-security-5.1.1/flask_security/templates/security/email/two_factor_instructions.html
--- flask-security-5.1.0/flask_security/templates/security/email/two_factor_instructions.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/email/two_factor_instructions.html	2023-03-01 20:12:52.000000000 +0100
@@ -1,3 +1,2 @@
 <p>{{ _fsdomain("Welcome") }} {{ username }}!</p>
-
 <p>{{ _fsdomain("You can log into your account using the following code:") }} {{ token }}</p>
diff -Nru flask-security-5.1.0/flask_security/templates/security/email/two_factor_rescue.html flask-security-5.1.1/flask_security/templates/security/email/two_factor_rescue.html
--- flask-security-5.1.0/flask_security/templates/security/email/two_factor_rescue.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/email/two_factor_rescue.html	2023-03-01 20:12:52.000000000 +0100
@@ -1 +1 @@
-<p> {{ user.email }} {{ _fsdomain("can not access mail account") }}</p>
+<p>{{ user.email }} {{ _fsdomain("can not access mail account") }}</p>
diff -Nru flask-security-5.1.0/flask_security/templates/security/email/us_instructions.html flask-security-5.1.1/flask_security/templates/security/email/us_instructions.html
--- flask-security-5.1.0/flask_security/templates/security/email/us_instructions.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/email/us_instructions.html	2023-03-01 20:12:52.000000000 +0100
@@ -7,11 +7,10 @@
   security - the Flask-Security configuration
 #}
 <p>{{ _fsdomain("Welcome") }} {{ username }}!</p>
-
 <p>{{ _fsdomain("You can sign into your account using the following code:") }} {{ token }}</p>
-
 {% if login_link %}
   <p>{{ _fsdomain("Or use the link below:") }}</p>
-
-  <p><a href="{{ login_link }}">{{ _fsdomain("Sign In") }}</a></p>
-{%  endif %}
+  <p>
+    <a href="{{ login_link }}">{{ _fsdomain("Sign In") }}</a>
+  </p>
+{% endif %}
diff -Nru flask-security-5.1.0/flask_security/templates/security/email/welcome_existing.html flask-security-5.1.1/flask_security/templates/security/email/welcome_existing.html
--- flask-security-5.1.0/flask_security/templates/security/email/welcome_existing.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/email/welcome_existing.html	2023-03-01 20:12:52.000000000 +0100
@@ -9,15 +9,15 @@
   enumeration.
 #}
 <div>{{ _fsdomain('Hello %(email)s!', email=user.email) }}</div>
-
 <div>{{ _fsdomain('Someone (you?) tried to register this email - which is already in our system.') }}</div>
-
 {% if user.username %}
-<div>{{ _fsdomain('This account also has the following username associated with it: %(username)s.', username=user.username) }}</div>
+  <div>
+    {{ _fsdomain('This account also has the following username associated with it: %(username)s.', username=user.username) }}
+  </div>
 {% endif %}
-
 {% if recovery_link %}
-  <div>{{ _fsdomain('If you forgot your password you can reset it') }}
-  <a href="{{ recovery_link }}">{{ _fsdomain(' here.') }}</a>
+  <div>
+    {{ _fsdomain('If you forgot your password you can reset it') }}
+    <a href="{{ recovery_link }}">{{ _fsdomain(' here.') }}</a>
   </div>
 {% endif %}
diff -Nru flask-security-5.1.0/flask_security/templates/security/email/welcome_existing_username.html flask-security-5.1.1/flask_security/templates/security/email/welcome_existing_username.html
--- flask-security-5.1.0/flask_security/templates/security/email/welcome_existing_username.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/email/welcome_existing_username.html	2023-03-01 20:12:52.000000000 +0100
@@ -9,8 +9,7 @@
   for username enumeration.
 #}
 <div>{{ _fsdomain('Hello %(email)s!', email=email) }}</div>
-
-<div>{{ _fsdomain('You attempted to register with a username "%(username)s" that is already associated with another account.',
-  username=username) }}</div>
-
+<div>
+  {{ _fsdomain('You attempted to register with a username "%(username)s" that is already associated with another account.', username=username) }}
+</div>
 <div>{{ _fsdomain('Please restart the registration process with a different username.') }}</div>
diff -Nru flask-security-5.1.0/flask_security/templates/security/email/welcome.html flask-security-5.1.1/flask_security/templates/security/email/welcome.html
--- flask-security-5.1.0/flask_security/templates/security/email/welcome.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/email/welcome.html	2023-03-01 20:12:52.000000000 +0100
@@ -6,9 +6,9 @@
   security - the Flask-Security configuration
 #}
 <p>{{ _fsdomain('Welcome %(email)s!', email=user.email) }}</p>
-
 {% if security.confirmable %}
-<p>{{ _fsdomain('You can confirm your email through the link below:') }}</p>
-
-<p><a href="{{ confirmation_link }}">{{ _fsdomain('Confirm my account') }}</a></p>
+  <p>{{ _fsdomain('You can confirm your email through the link below:') }}</p>
+  <p>
+    <a href="{{ confirmation_link }}">{{ _fsdomain('Confirm my account') }}</a>
+  </p>
 {% endif %}
diff -Nru flask-security-5.1.0/flask_security/templates/security/forgot_password.html flask-security-5.1.1/flask_security/templates/security/forgot_password.html
--- flask-security-5.1.0/flask_security/templates/security/forgot_password.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/forgot_password.html	2023-03-01 20:12:52.000000000 +0100
@@ -2,12 +2,12 @@
 {% from "security/_macros.html" import render_field_with_errors, render_field %}
 
 {% block content %}
-{% include "security/_messages.html" %}
-<h1>{{ _fsdomain('Send password reset instructions') }}</h1>
-<form action="{{ url_for_security('forgot_password') }}" method="POST" name="forgot_password_form">
-  {{ forgot_password_form.hidden_tag() }}
-  {{ render_field_with_errors(forgot_password_form.email) }}
-  {{ render_field(forgot_password_form.submit) }}
-</form>
-{% include "security/_menu.html" %}
-{% endblock %}
+  {% include "security/_messages.html" %}
+  <h1>{{ _fsdomain('Send password reset instructions') }}</h1>
+  <form action="{{ url_for_security('forgot_password') }}" method="post" name="forgot_password_form">
+    {{ forgot_password_form.hidden_tag() }}
+    {{ render_field_with_errors(forgot_password_form.email) }}
+    {{ render_field(forgot_password_form.submit) }}
+  </form>
+  {% include "security/_menu.html" %}
+{% endblock content %}
diff -Nru flask-security-5.1.0/flask_security/templates/security/login_user.html flask-security-5.1.1/flask_security/templates/security/login_user.html
--- flask-security-5.1.0/flask_security/templates/security/login_user.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/login_user.html	2023-03-01 20:12:52.000000000 +0100
@@ -2,22 +2,17 @@
 {% from "security/_macros.html" import render_field_with_errors, render_field, render_field_errors, render_form_errors, prop_next %}
 
 {% block content %}
-{% include "security/_messages.html" %}
-<h1>{{ _fsdomain('Login') }}</h1>
-  <form action="{{ url_for_security('login') }}{{ prop_next() }}" method="POST" name="login_user_form">
+  {% include "security/_messages.html" %}
+  <h1>{{ _fsdomain('Login') }}</h1>
+  <form action="{{ url_for_security('login') }}{{ prop_next() }}" method="post" name="login_user_form">
     {{ login_user_form.hidden_tag() }}
     {{ render_form_errors(login_user_form) }}
-    {% if "email" in identity_attributes %}
-      {{ render_field_with_errors(login_user_form.email) }}
-    {% endif %}
+    {% if "email" in identity_attributes %}{{ render_field_with_errors(login_user_form.email) }}{% endif %}
     {% if login_user_form.username and "username" in identity_attributes %}
-      {% if "email" in identity_attributes %}
-        <h3>{{ _fsdomain("or") }}</h3>
-      {% endif %}
+      {% if "email" in identity_attributes %}<h3>{{ _fsdomain("or") }}</h3>{% endif %}
       {{ render_field_with_errors(login_user_form.username) }}
     {% endif %}
-    <div class="fs-gap">
-      {{ render_field_with_errors(login_user_form.password) }}</div>
+    <div class="fs-gap">{{ render_field_with_errors(login_user_form.password) }}</div>
     {{ render_field_with_errors(login_user_form.remember) }}
     {{ render_field_errors(login_user_form.csrf_token) }}
     {{ render_field(login_user_form.submit) }}
@@ -26,9 +21,8 @@
     <hr class="fs-gap">
     <h2>{{ _fsdomain("Use WebAuthn to Sign In") }}</h2>
     <div>
-      <form method="GET" id="wan-signin-form" name="wan_signin_form">
-        <input id="wan_signin" name="wan_signin" type="submit" value="{{ _fsdomain('Sign in with WebAuthn') }}"
-          formaction="{{ url_for_security('wan_signin') }}{{ prop_next() }}">
+      <form method="get" id="wan-signin-form" name="wan_signin_form">
+        <input id="wan_signin" name="wan_signin" type="submit" value="{{ _fsdomain('Sign in with WebAuthn') }}" formaction="{{ url_for_security('wan_signin') }}{{ prop_next() }}">
       </form>
     </div>
   {% endif %}
@@ -37,12 +31,11 @@
     <h2>{{ _fsdomain("Use Social Oauth to Sign In") }}</h2>
     {% for provider in security.oauthglue.provider_names %}
       <div class="fs-gap">
-        <form method="POST" id={{ provider }}-form name={{ provider }}_form>
-          <input id={{ provider }} name={{ provider }} type="submit" value="{{ _fsdomain('Sign in with ')~provider }}"
-            formaction="{{ url_for_security('oauthstart', name=provider) }}{{ prop_next() }}">
+        <form method="post" id="{{ provider }}"-form name="{{ provider }}"_form>
+          <input id="{{ provider }}" name="{{ provider }}" type="submit" value="{{ _fsdomain('Sign in with ')~provider }}" formaction="{{ url_for_security('oauthstart', name=provider) }}{{ prop_next() }}">
         </form>
       </div>
     {% endfor %}
   {% endif %}
-{% include "security/_menu.html" %}
-{% endblock %}
+  {% include "security/_menu.html" %}
+{% endblock content %}
diff -Nru flask-security-5.1.0/flask_security/templates/security/_macros.html flask-security-5.1.1/flask_security/templates/security/_macros.html
--- flask-security-5.1.0/flask_security/templates/security/_macros.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/_macros.html	2023-03-01 20:12:52.000000000 +0100
@@ -3,9 +3,7 @@
     {{ field.label }} {{ field(**kwargs)|safe }}
     {% if field.errors %}
       <ul>
-      {% for error in field.errors %}
-        <li class="fs-error-msg">{{ error }}</li>
-      {% endfor %}
+        {% for error in field.errors %}<li class="fs-error-msg">{{ error }}</li>{% endfor %}
       </ul>
     {% endif %}
   </div>
@@ -19,9 +17,7 @@
   <div class="fs-div" id="{{ field.id if field else 'fs-field' }}">
     {% if field and field.errors %}
       <ul>
-      {% for error in field.errors %}
-        <li class="fs-error-msg">{{ error }}</li>
-      {% endfor %}
+        {% for error in field.errors %}<li class="fs-error-msg">{{ error }}</li>{% endfor %}
       </ul>
     {% endif %}
   </div>
@@ -31,11 +27,9 @@
 {% macro render_form_errors(form) %}
   {% if form.form_errors %}
     <div class="fs-div" id="fs-form-errors">
-    <ul>
-    {% for error in form.form_errors %}
-      <li class="fs-error-msg">{{ error }}</li>
-    {% endfor %}
-    </ul>
+      <ul>
+        {% for error in form.form_errors %}<li class="fs-error-msg">{{ error }}</li>{% endfor %}
+      </ul>
     </div>
   {% endif %}
 {% endmacro %}
diff -Nru flask-security-5.1.0/flask_security/templates/security/_menu.html flask-security-5.1.1/flask_security/templates/security/_menu.html
--- flask-security-5.1.0/flask_security/templates/security/_menu.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/_menu.html	2023-03-01 20:12:52.000000000 +0100
@@ -1,38 +1,58 @@
 {% if security.registerable or security.recoverable or security.confirmable or security.unified_signin or security.two_factor or security.webauthn %}
-<hr>
-<h2>{{ _fsdomain('Menu') }}</h2>
-<ul>
-  {% if current_user and current_user.is_authenticated %}
-    {# already authenticated user #}
-    <li><a href="{{ url_for_security('logout') }}">{{ _fsdomain("Sign out") }}</a></li>
-    {% if security.changeable %}
-      <li><a href="{{ url_for_security('change_password') }}">{{ _fsdomain("Change Password") }}</li>
+  <hr>
+  <h2>{{ _fsdomain('Menu') }}</h2>
+  <ul>
+    {% if current_user and current_user.is_authenticated %}
+      {# already authenticated user #}
+      <li>
+        <a href="{{ url_for_security('logout') }}">{{ _fsdomain("Sign out") }}</a>
+      </li>
+      {% if security.changeable %}
+        <li>
+          <a href="{{ url_for_security('change_password') }}">{{ _fsdomain("Change Password") }}
+        </li>
+      {% endif %}
+      {% if security.two_factor %}
+        <li>
+          <a href="{{ url_for_security('two_factor_setup') }}">{{ _fsdomain("Two Factor Setup") }}
+        </li>
+      {% endif %}
+      {% if security.unified_signin %}
+        <li>
+          <a href="{{ url_for_security('us_setup') }}">{{ _fsdomain("Unified Signin Setup") }}
+        </li>
+      {% endif %}
+      {% if security.webauthn %}
+        <li>
+          <a href="{{ url_for_security('wan_register') }}">{{ _fsdomain("WebAuthn Setup") }}
+        </li>
+      {% endif %}
+    {% else %}
+      {% if not skip_login_menu %}
+        <li>
+          <a href="{{ url_for_security('login') }}{%- if 'next' in request.args -%}?next={{ request.args.next|urlencode }}{%- endif -%}">{{ _fsdomain('Login') }}</a>
+        </li>
+      {% endif %}
+      {% if security.unified_signin and not skip_login_menu %}
+        <li>
+          <a href="{{ url_for_security('us_signin') }}{%- if 'next' in request.args -%}?next={{ request.args.next|urlencode }}{%- endif -%}">{{ _fsdomain('Unified Sign In') }}</a>
+        </li>
+      {% endif %}
+      {% if security.registerable %}
+        <li>
+          <a href="{{ url_for_security('register') }}{%- if 'next' in request.args -%}?next={{ request.args.next|urlencode }}{%- endif -%}">{{ _fsdomain('Register') }}</a>
+        </li>
+      {% endif %}
+      {% if security.recoverable %}
+        <li>
+          <a href="{{ url_for_security('forgot_password') }}">{{ _fsdomain('Forgot password') }}</a>
+        </li>
+      {% endif %}
+      {% if security.confirmable %}
+        <li>
+          <a href="{{ url_for_security('send_confirmation') }}">{{ _fsdomain('Confirm account') }}</a>
+        </li>
+      {% endif %}
     {% endif %}
-    {% if security.two_factor %}
-      <li><a href="{{ url_for_security('two_factor_setup') }}">{{ _fsdomain("Two Factor Setup") }}</li>
-    {% endif %}
-    {% if security.unified_signin %}
-      <li><a href="{{ url_for_security('us_setup') }}">{{ _fsdomain("Unified Signin Setup") }}</li>
-    {% endif %}
-    {% if security.webauthn %}
-      <li><a href="{{ url_for_security('wan_register') }}">{{ _fsdomain("WebAuthn Setup") }}</li>
-    {% endif %}
-  {% else %}
-    {% if not skip_login_menu %}
-      <li><a href="{{ url_for_security('login') }}{% if 'next' in request.args %}?next={{ request.args.next|urlencode }}{% endif %}">{{ _fsdomain('Login') }}</a></li>
-    {% endif %}
-    {% if security.unified_signin and not skip_login_menu %}
-    <li><a href="{{ url_for_security('us_signin') }}{% if 'next' in request.args %}?next={{ request.args.next|urlencode }}{% endif %}">{{ _fsdomain("Unified Sign In") }}</a><br/></li>
-    {% endif %}
-    {% if security.registerable %}
-    <li><a href="{{ url_for_security('register') }}{% if 'next' in request.args %}?next={{ request.args.next|urlencode }}{% endif %}">{{ _fsdomain('Register') }}</a><br/></li>
-    {% endif %}
-    {% if security.recoverable %}
-    <li><a href="{{ url_for_security('forgot_password') }}">{{ _fsdomain('Forgot password') }}</a><br/></li>
-    {% endif %}
-    {% if security.confirmable %}
-    <li><a href="{{ url_for_security('send_confirmation') }}">{{ _fsdomain('Confirm account') }}</a></li>
-    {% endif %}
-  {% endif %}
-</ul>
+  </ul>
 {% endif %}
diff -Nru flask-security-5.1.0/flask_security/templates/security/_messages.html flask-security-5.1.1/flask_security/templates/security/_messages.html
--- flask-security-5.1.0/flask_security/templates/security/_messages.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/_messages.html	2023-03-01 20:12:52.000000000 +0100
@@ -1,9 +1,7 @@
 {%- with messages = get_flashed_messages(with_categories=true) -%}
   {% if messages %}
     <ul class="flashes">
-    {% for category, message in messages %}
-      <li class="{{ category }} fs-error-msg">{{ message }}</li>
-    {% endfor %}
+      {% for category, message in messages %}<li class="{{ category }} fs-error-msg">{{ message }}</li>{% endfor %}
     </ul>
   {% endif %}
 {%- endwith %}
diff -Nru flask-security-5.1.0/flask_security/templates/security/mf_recovery_codes.html flask-security-5.1.1/flask_security/templates/security/mf_recovery_codes.html
--- flask-security-5.1.0/flask_security/templates/security/mf_recovery_codes.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/mf_recovery_codes.html	2023-03-01 20:12:52.000000000 +0100
@@ -2,31 +2,26 @@
 {% from "security/_macros.html" import render_field_with_errors, render_field, render_field_errors %}
 
 {% block content %}
-    {% include "security/_messages.html" %}
-    <h1>{{ _fsdomain("Recovery Codes") }}</h1>
-    {% if recovery_codes %}
-      <ul>
-        {% for rc in recovery_codes %}
-          <li class="fs-div">{{ rc }}</li>
-        {% endfor %}
-      </ul>
-      <div class="fs-important">
+  {% include "security/_messages.html" %}
+  <h1>{{ _fsdomain("Recovery Codes") }}</h1>
+  {% if recovery_codes %}
+    <ul>
+      {% for rc in recovery_codes %}<li class="fs-div">{{ rc }}</li>{% endfor %}
+    </ul>
+    <div class="fs-important">
       {{ _fsdomain("Be sure to copy these and store in a safe place. Each code can be used only once.") }}
-      </div>
-    {% else %}
-      <form action="{{ url_for_security('mf_recovery_codes') }}" method="GET"
-            name="mf_recovery_codes_form">
-
-          {{ render_field_with_errors(mf_recovery_codes_form.show_codes) }}
-      </form>
-    {% endif %}
-    <hr class="fs-gap">
-    <h2>{{ _fsdomain("Generate new Recovery Codes") }}</h2>
-    <form action="{{ url_for_security('mf_recovery_codes') }}" method="POST"
-      name="mf_recovery_codes_form">
-        {{ mf_recovery_codes_form.hidden_tag() }}
-        {{ render_field_errors(mf_recovery_codes_form.csrf_token) }}
-        {{ render_field(mf_recovery_codes_form.generate_new_codes) }}
+    </div>
+  {% else %}
+    <form action="{{ url_for_security('mf_recovery_codes') }}" method="get" name="mf_recovery_codes_form">
+      {{ render_field_with_errors(mf_recovery_codes_form.show_codes) }}
     </form>
-    {% include "security/_menu.html" %}
-{% endblock %}
+  {% endif %}
+  <hr class="fs-gap">
+  <h2>{{ _fsdomain("Generate new Recovery Codes") }}</h2>
+  <form action="{{ url_for_security('mf_recovery_codes') }}" method="post" name="mf_recovery_codes_form">
+    {{ mf_recovery_codes_form.hidden_tag() }}
+    {{ render_field_errors(mf_recovery_codes_form.csrf_token) }}
+    {{ render_field(mf_recovery_codes_form.generate_new_codes) }}
+  </form>
+  {% include "security/_menu.html" %}
+{% endblock content %}
diff -Nru flask-security-5.1.0/flask_security/templates/security/mf_recovery.html flask-security-5.1.1/flask_security/templates/security/mf_recovery.html
--- flask-security-5.1.0/flask_security/templates/security/mf_recovery.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/mf_recovery.html	2023-03-01 20:12:52.000000000 +0100
@@ -2,12 +2,11 @@
 {% from "security/_macros.html" import render_field_with_errors, render_field %}
 
 {% block content %}
-    {% include "security/_messages.html" %}
-    <h1>{{ _fsdomain("Enter Recovery Code") }}</h1>
-    <form action="{{ url_for_security('mf_recovery') }}" method="POST"
-          name="mf_recovery_form">
-        {{ mf_recovery_form.hidden_tag() }}
-        {{ render_field_with_errors(mf_recovery_form.code) }}
-        {{ render_field(mf_recovery_form.submit) }}
-    </form>
-{% endblock %}
+  {% include "security/_messages.html" %}
+  <h1>{{ _fsdomain("Enter Recovery Code") }}</h1>
+  <form action="{{ url_for_security('mf_recovery') }}" method="post" name="mf_recovery_form">
+    {{ mf_recovery_form.hidden_tag() }}
+    {{ render_field_with_errors(mf_recovery_form.code) }}
+    {{ render_field(mf_recovery_form.submit) }}
+  </form>
+{% endblock content %}
diff -Nru flask-security-5.1.0/flask_security/templates/security/register_user.html flask-security-5.1.1/flask_security/templates/security/register_user.html
--- flask-security-5.1.0/flask_security/templates/security/register_user.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/register_user.html	2023-03-01 20:12:52.000000000 +0100
@@ -2,20 +2,18 @@
 {% from "security/_macros.html" import render_field_with_errors, render_field, render_form_errors %}
 
 {% block content %}
-{% include "security/_messages.html" %}
-<h1>{{ _fsdomain('Register') }}</h1>
-<form action="{{ url_for_security('register') }}" method="POST" name="register_user_form">
-  {{ register_user_form.hidden_tag() }}
-  {{ render_form_errors(register_user_form) }}
-  {{ render_field_with_errors(register_user_form.email) }}
-  {% if security.username_enable %}
-    {{ render_field_with_errors(register_user_form.username) }}
-  {%  endif %}
-  {{ render_field_with_errors(register_user_form.password) }}
-  {% if register_user_form.password_confirm %}
-    {{ render_field_with_errors(register_user_form.password_confirm) }}
-  {% endif %}
-  {{ render_field(register_user_form.submit) }}
-</form>
-{% include "security/_menu.html" %}
-{% endblock %}
+  {% include "security/_messages.html" %}
+  <h1>{{ _fsdomain('Register') }}</h1>
+  <form action="{{ url_for_security('register') }}" method="post" name="register_user_form">
+    {{ register_user_form.hidden_tag() }}
+    {{ render_form_errors(register_user_form) }}
+    {{ render_field_with_errors(register_user_form.email) }}
+    {% if security.username_enable %}{{ render_field_with_errors(register_user_form.username) }}{% endif %}
+    {{ render_field_with_errors(register_user_form.password) }}
+    {% if register_user_form.password_confirm %}
+      {{ render_field_with_errors(register_user_form.password_confirm) }}
+    {% endif %}
+    {{ render_field(register_user_form.submit) }}
+  </form>
+  {% include "security/_menu.html" %}
+{% endblock content %}
diff -Nru flask-security-5.1.0/flask_security/templates/security/reset_password.html flask-security-5.1.1/flask_security/templates/security/reset_password.html
--- flask-security-5.1.0/flask_security/templates/security/reset_password.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/reset_password.html	2023-03-01 20:12:52.000000000 +0100
@@ -2,13 +2,13 @@
 {% from "security/_macros.html" import render_field_with_errors, render_field %}
 
 {% block content %}
-{% include "security/_messages.html" %}
-<h1>{{ _fsdomain('Reset password') }}</h1>
-<form action="{{ url_for_security('reset_password', token=reset_password_token) }}" method="POST" name="reset_password_form">
-  {{ reset_password_form.hidden_tag() }}
-  {{ render_field_with_errors(reset_password_form.password) }}
-  {{ render_field_with_errors(reset_password_form.password_confirm) }}
-  {{ render_field(reset_password_form.submit) }}
-</form>
-{% include "security/_menu.html" %}
-{% endblock %}
+  {% include "security/_messages.html" %}
+  <h1>{{ _fsdomain('Reset password') }}</h1>
+  <form action="{{ url_for_security('reset_password', token=reset_password_token) }}" method="post" name="reset_password_form">
+    {{ reset_password_form.hidden_tag() }}
+    {{ render_field_with_errors(reset_password_form.password) }}
+    {{ render_field_with_errors(reset_password_form.password_confirm) }}
+    {{ render_field(reset_password_form.submit) }}
+  </form>
+  {% include "security/_menu.html" %}
+{% endblock content %}
diff -Nru flask-security-5.1.0/flask_security/templates/security/send_confirmation.html flask-security-5.1.1/flask_security/templates/security/send_confirmation.html
--- flask-security-5.1.0/flask_security/templates/security/send_confirmation.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/send_confirmation.html	2023-03-01 20:12:52.000000000 +0100
@@ -2,12 +2,12 @@
 {% from "security/_macros.html" import render_field_with_errors, render_field %}
 
 {% block content %}
-{% include "security/_messages.html" %}
-<h1>{{ _fsdomain('Resend confirmation instructions') }}</h1>
-<form action="{{ url_for_security('send_confirmation') }}" method="POST" name="send_confirmation_form">
-  {{ send_confirmation_form.hidden_tag() }}
-  {{ render_field_with_errors(send_confirmation_form.email) }}
-  {{ render_field(send_confirmation_form.submit) }}
-</form>
-{% include "security/_menu.html" %}
-{% endblock %}
+  {% include "security/_messages.html" %}
+  <h1>{{ _fsdomain('Resend confirmation instructions') }}</h1>
+  <form action="{{ url_for_security('send_confirmation') }}" method="post" name="send_confirmation_form">
+    {{ send_confirmation_form.hidden_tag() }}
+    {{ render_field_with_errors(send_confirmation_form.email) }}
+    {{ render_field(send_confirmation_form.submit) }}
+  </form>
+  {% include "security/_menu.html" %}
+{% endblock content %}
diff -Nru flask-security-5.1.0/flask_security/templates/security/send_login.html flask-security-5.1.1/flask_security/templates/security/send_login.html
--- flask-security-5.1.0/flask_security/templates/security/send_login.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/send_login.html	2023-03-01 20:12:52.000000000 +0100
@@ -2,12 +2,12 @@
 {% from "security/_macros.html" import render_field_with_errors, render_field %}
 
 {% block content %}
-{% include "security/_messages.html" %}
-<h1>{{ _fsdomain('Login') }}</h1>
-<form action="{{ url_for_security('login') }}" method="POST" name="send_login_form">
-  {{ send_login_form.hidden_tag() }}
-  {{ render_field_with_errors(send_login_form.email) }}
-  {{ render_field(send_login_form.submit) }}
-</form>
-{% include "security/_menu.html" %}
-{% endblock %}
+  {% include "security/_messages.html" %}
+  <h1>{{ _fsdomain('Login') }}</h1>
+  <form action="{{ url_for_security('login') }}" method="post" name="send_login_form">
+    {{ send_login_form.hidden_tag() }}
+    {{ render_field_with_errors(send_login_form.email) }}
+    {{ render_field(send_login_form.submit) }}
+  </form>
+  {% include "security/_menu.html" %}
+{% endblock content %}
diff -Nru flask-security-5.1.0/flask_security/templates/security/two_factor_select.html flask-security-5.1.1/flask_security/templates/security/two_factor_select.html
--- flask-security-5.1.0/flask_security/templates/security/two_factor_select.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/two_factor_select.html	2023-03-01 20:12:52.000000000 +0100
@@ -2,12 +2,12 @@
 {% from "security/_macros.html" import prop_next, render_field_with_errors, render_field %}
 
 {% block content %}
-{% include "security/_messages.html" %}
-<h1>{{ _fsdomain('Select Two Factor Method') }}</h1>
-<form action="{{ url_for_security('tf_select') }}{{ prop_next() }}" method="POST" name="tf_select">
-  {{ two_factor_select_form.hidden_tag() }}
-  {{ render_field_with_errors(two_factor_select_form.which) }}
-  {{ render_field(two_factor_select_form.submit) }}
-</form>
-{% include "security/_menu.html" %}
-{% endblock %}
+  {% include "security/_messages.html" %}
+  <h1>{{ _fsdomain('Select Two Factor Method') }}</h1>
+  <form action="{{ url_for_security('tf_select') }}{{ prop_next() }}" method="post" name="tf_select">
+    {{ two_factor_select_form.hidden_tag() }}
+    {{ render_field_with_errors(two_factor_select_form.which) }}
+    {{ render_field(two_factor_select_form.submit) }}
+  </form>
+  {% include "security/_menu.html" %}
+{% endblock content %}
diff -Nru flask-security-5.1.0/flask_security/templates/security/two_factor_setup.html flask-security-5.1.1/flask_security/templates/security/two_factor_setup.html
--- flask-security-5.1.0/flask_security/templates/security/two_factor_setup.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/two_factor_setup.html	2023-03-01 20:12:52.000000000 +0100
@@ -20,67 +20,63 @@
 {% from "security/_macros.html" import render_field_with_errors, render_field, render_field_no_label, render_field_errors %}
 
 {% block content %}
-    {% include "security/_messages.html" %}
-    <h1>{{ _fsdomain("Two-factor authentication adds an extra layer of security to your account") }}</h1>
-    <h3>{{ _fsdomain("In addition to your username and password, you'll need to use a code.") }}</h3>
-    <form action="{{ url_for_security('two_factor_setup') }}" method="POST" name="two_factor_setup_form">
-        {{ two_factor_setup_form.hidden_tag() }}
-        <div class="fs-div">{{ _fsdomain("Currently setup two-factor method: %(method)s", method=primary_method) }}</div>
-        <div class="fs-gap"></div>
-        {% for subfield in two_factor_setup_form.setup %}
-            {% if subfield.data in choices %}
-                {{ render_field_with_errors(subfield) }}
-            {% endif %}
-        {% endfor %}
-        {{ render_field_errors(two_factor_setup_form.setup) }}
-        {{ render_field(two_factor_setup_form.submit) }}
-        {% if chosen_method=="email" and chosen_method in choices %}
-            <div>{{ _fsdomain("To complete logging in, please enter the code sent to your mail") }}</div>
-        {% endif %}
-        {% if chosen_method=="authenticator" and chosen_method in choices %}
-          <hr>
-          <div class="fs-center">
-            <div>
-              {{ _fsdomain("Open an authenticator app on your device and scan the following QRcode (or enter the code below manually) to start receiving codes:") }}
-            </div>
-            <div>
-               <img alt="{{ _fsdomain("Two factor authentication code") }}" id="qrcode" src="{{ authr_qrcode }}">
-            </div>
-            <div>
-              {{ authr_key }}
-            </div>
-          </div>
-        {% endif %}
-        {% if chosen_method=="sms" and chosen_method in choices %}
-            <p>{{ _fsdomain("To Which Phone Number Should We Send Code To?") }}</p>
-            {{ two_factor_setup_form.hidden_tag() }}
-            {{ render_field_with_errors(two_factor_setup_form.phone) }}
-            {{ render_field(two_factor_setup_form.submit) }}
-        {% endif %}
-    </form>
-    {% if security.webauthn and not chosen_method %}
-      <h3>{{ _fsdomain("WebAuthn") }}</h3>
-      <div class="fs-div">
-        {{ _fsdomain("This application supports WebAuthn security keys.") }}
-        <a href="{{ url_for_security('wan_register') }}">{{ _fsdomain("You can set them up here.") }}</a>
-      </div>
+  {% include "security/_messages.html" %}
+  <h1>{{ _fsdomain("Two-factor authentication adds an extra layer of security to your account") }}</h1>
+  <h3>{{ _fsdomain("In addition to your username and password, you'll need to use a code.") }}</h3>
+  <form action="{{ url_for_security('two_factor_setup') }}" method="post" name="two_factor_setup_form">
+    {{ two_factor_setup_form.hidden_tag() }}
+    <div class="fs-div">{{ _fsdomain("Currently setup two-factor method: %(method)s", method=primary_method) }}</div>
+    <hr class="fs-gap">
+    {% for subfield in two_factor_setup_form.setup %}
+      {% if subfield.data in choices %}{{ render_field_with_errors(subfield) }}{% endif %}
+    {% endfor %}
+    {{ render_field_errors(two_factor_setup_form.setup) }}
+    {{ render_field(two_factor_setup_form.submit) }}
+    {% if chosen_method=="email" and chosen_method in choices %}
+      <div>{{ _fsdomain("To complete logging in, please enter the code sent to your mail") }}</div>
     {% endif %}
-    {% if chosen_method %}
-      {# Hide this when first setting up #}
+    {% if chosen_method=="authenticator" and chosen_method in choices %}
       <hr>
-      <form action="{{ url_for_security("two_factor_token_validation") }}" method="POST"
-            name="two_factor_verify_code_form">
-          {{ two_factor_verify_code_form.hidden_tag() }}
-          {{ render_field_with_errors(two_factor_verify_code_form.code) }}
-          {{ render_field(two_factor_verify_code_form.submit) }}
-      </form>
-    {% endif %}
-    {% if security.support_mfa and security.multi_factor_recovery_codes %}
-      <h3>{{ _fsdomain("Recovery Codes") }}</h3>
-      <div class="fs-div">
-        {{ _fsdomain("This application supports setting up recovery codes.") }}
-        <a href="{{ url_for_security('mf_recovery_codes') }}">{{ _fsdomain("You can set them up here.") }}</a>
+      <div class="fs-center">
+        <div>
+          {{ _fsdomain("Open an authenticator app on your device and scan the following QRcode (or enter the code below manually) to start receiving codes:") }}
+        </div>
+        <div>
+          <img alt="{{ _fsdomain('Two factor authentication code') }}" id="qrcode" src="{{ authr_qrcode }}">
+          {# TODO: add width and heigth attrs #}%}
+        </div>
+        <div>{{ authr_key }}</div>
       </div>
     {% endif %}
-    {% include "security/_menu.html" %}
-{% endblock %}
+    {% if chosen_method=="sms" and chosen_method in choices %}
+      <p>{{ _fsdomain("To Which Phone Number Should We Send Code To?") }}</p>
+      {{ two_factor_setup_form.hidden_tag() }}
+      {{ render_field_with_errors(two_factor_setup_form.phone) }}
+      {{ render_field(two_factor_setup_form.submit) }}
+    {% endif %}
+  </form>
+  {% if security.webauthn and not chosen_method %}
+    <h3>{{ _fsdomain("WebAuthn") }}</h3>
+    <div class="fs-div">
+      {{ _fsdomain("This application supports WebAuthn security keys.") }}
+      <a href="{{ url_for_security('wan_register') }}">{{ _fsdomain("You can set them up here.") }}</a>
+    </div>
+  {% endif %}
+  {% if chosen_method %}
+    {# Hide this when first setting up #}
+    <hr>
+    <form action="{{ url_for_security('two_factor_token_validation') }}" method="post" name="two_factor_verify_code_form">
+      {{ two_factor_verify_code_form.hidden_tag() }}
+      {{ render_field_with_errors(two_factor_verify_code_form.code) }}
+      {{ render_field(two_factor_verify_code_form.submit) }}
+    </form>
+  {% endif %}
+  {% if security.support_mfa and security.multi_factor_recovery_codes %}
+    <h3>{{ _fsdomain("Recovery Codes") }}</h3>
+    <div class="fs-div">
+      {{ _fsdomain("This application supports setting up recovery codes.") }}
+      <a href="{{ url_for_security('mf_recovery_codes') }}">{{ _fsdomain("You can set them up here.") }}</a>
+    </div>
+  {% endif %}
+  {% include "security/_menu.html" %}
+{% endblock content %}
diff -Nru flask-security-5.1.0/flask_security/templates/security/two_factor_verify_code.html flask-security-5.1.1/flask_security/templates/security/two_factor_verify_code.html
--- flask-security-5.1.0/flask_security/templates/security/two_factor_verify_code.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/two_factor_verify_code.html	2023-03-01 20:12:52.000000000 +0100
@@ -2,26 +2,25 @@
 {% from "security/_macros.html" import render_field_with_errors, render_field, prop_next %}
 
 {% block content %}
-    {% include "security/_messages.html" %}
-    <h1>{{ _fsdomain("Two-factor Authentication") }}</h1>
-    <h2>{{ _fsdomain("Please enter your authentication code generated via: %(method)s", method=chosen_method) }}</h2>
-    <form action="{{ url_for_security('two_factor_token_validation') }}{{ prop_next() }}" method="POST"
-          name="two_factor_verify_code_form">
-        {{ two_factor_verify_code_form.hidden_tag() }}
-        {{ render_field_with_errors(two_factor_verify_code_form.code, placeholder="enter code") }}
-        {{ render_field(two_factor_verify_code_form.submit) }}
-    </form>
-    <hr class="fs-gap">
-    <form action="{{ url_for_security('two_factor_rescue') }}{{  prop_next() }}" method="POST" name="two_factor_rescue_form">
-        {{ two_factor_rescue_form.hidden_tag() }}
-        {{ render_field_with_errors(two_factor_rescue_form.help_setup) }}
-        {% if problem=="email" %}
-            <div>{{ _fsdomain("The code for authentication was sent to your email address") }}</div>
-        {% endif %}
-        {% if problem=="help" %}
-            <div>{{ _fsdomain("A mail was sent to us in order to reset your application account") }}</div>
-        {% endif %}
-        {{ render_field(two_factor_rescue_form.submit) }}
-    </form>
-    {% include "security/_menu.html" %}
-{% endblock %}
+  {% include "security/_messages.html" %}
+  <h1>{{ _fsdomain("Two-factor Authentication") }}</h1>
+  <h2>{{ _fsdomain("Please enter your authentication code generated via: %(method)s", method=chosen_method) }}</h2>
+  <form action="{{ url_for_security('two_factor_token_validation') }}{{ prop_next() }}" method="post" name="two_factor_verify_code_form">
+    {{ two_factor_verify_code_form.hidden_tag() }}
+    {{ render_field_with_errors(two_factor_verify_code_form.code, placeholder="enter code") }}
+    {{ render_field(two_factor_verify_code_form.submit) }}
+  </form>
+  <hr class="fs-gap">
+  <form action="{{ url_for_security('two_factor_rescue') }}{{ prop_next() }}" method="post" name="two_factor_rescue_form">
+    {{ two_factor_rescue_form.hidden_tag() }}
+    {{ render_field_with_errors(two_factor_rescue_form.help_setup) }}
+    {% if problem=="email" %}
+      <div>{{ _fsdomain("The code for authentication was sent to your email address") }}</div>
+    {% endif %}
+    {% if problem=="help" %}
+      <div>{{ _fsdomain("A mail was sent to us in order to reset your application account") }}</div>
+    {% endif %}
+    {{ render_field(two_factor_rescue_form.submit) }}
+  </form>
+  {% include "security/_menu.html" %}
+{% endblock content %}
diff -Nru flask-security-5.1.0/flask_security/templates/security/us_setup.html flask-security-5.1.1/flask_security/templates/security/us_setup.html
--- flask-security-5.1.0/flask_security/templates/security/us_setup.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/us_setup.html	2023-03-01 20:12:52.000000000 +0100
@@ -24,82 +24,75 @@
 {% from "security/_macros.html" import render_field_with_errors, render_field, render_field_errors, render_form_errors %}
 
 {% block content %}
-    {% include "security/_messages.html" %}
-    <h1>{{ _fsdomain("Setup Unified Sign In") }}</h1>
-    <form action="{{ url_for_security('us_setup') }}" method="POST"
-          name="us_setup_form">
-      {{ us_setup_form.hidden_tag() }}
-      {{ render_form_errors(us_setup_form) }}
-      {% if setup_methods %}
-        <div class="fs-div">{{ _fsdomain("Currently active sign in options:") }}<em>
-        {% if active_methods %}
-          {{ ", ".join(active_methods) }}
-        {% else %}
-          None.
+  {% include "security/_messages.html" %}
+  <h1>{{ _fsdomain("Setup Unified Sign In") }}</h1>
+  <form action="{{ url_for_security('us_setup') }}" method="post" name="us_setup_form">
+    {{ us_setup_form.hidden_tag() }}
+    {{ render_form_errors(us_setup_form) }}
+    {% if setup_methods %}
+      <div class="fs-div">
+        {{ _fsdomain("Currently active sign in options:") }}
+        <em>
+          {% if active_methods %}
+            {{ ", ".join(active_methods) }}
+          {% else %}
+            None.
+          {% endif %}
+        </em>
+      </div>
+      <h3>{{ us_setup_form.chosen_method.label }}</h3>
+      <div class="fs-div">
+        {% for subfield in us_setup_form.chosen_method %}{{ render_field_with_errors(subfield) }}{% endfor %}
+        {{ render_field_errors(us_setup_form.chosen_method) }}
+      </div>
+      <div class="fs-div">
+        {% if "sms" in available_methods and "sms" not in active_methods %}
+          {{ render_field_with_errors(us_setup_form.phone) }}
         {% endif %}
-        </em></div>
-
-        <h3>{{ us_setup_form.chosen_method.label }}</h3>
-        <div class="fs-div">
-          {% for subfield in us_setup_form.chosen_method %}
-              {{ render_field_with_errors(subfield) }}
-          {% endfor %}
-          {{ render_field_errors(us_setup_form.chosen_method) }}
-        </div>
-
+      </div>
+      {% if us_setup_form.delete_method.choices and not state %}
+        {#  don't show delete if we're trying to validate a setup #}
+        <h3>{{ us_setup_form.delete_method.label }}</h3>
         <div class="fs-div">
-          {% if "sms" in available_methods and "sms" not in active_methods %}
-            {{ render_field_with_errors(us_setup_form.phone) }}
-          {% endif %}
+          {% for subfield in us_setup_form.delete_method %}{{ render_field_with_errors(subfield) }}{% endfor %}
+          {{ render_field_errors(us_setup_form.delete_method) }}
         </div>
-        {% if us_setup_form.delete_method.choices and not state %}
-          {#  don't show delete if we're trying to validate a setup #}
-          <h3>{{ us_setup_form.delete_method.label }}</h3>
-          <div class="fs-div">
-            {% for subfield in us_setup_form.delete_method %}
-              {{ render_field_with_errors(subfield) }}
-            {% endfor %}
-            {{ render_field_errors(us_setup_form.delete_method) }}
+      {% endif %}
+      <div class="fs-gap">{{ render_field(us_setup_form.submit) }}</div>
+      {% if chosen_method == "authenticator" %}
+        <hr>
+        <div class="fs-center">
+          <div>
+            {{ _fsdomain("Open an authenticator app on your device and scan the following QRcode (or enter the code below manually) to start receiving codes:") }}
           </div>
-        {% endif %}
-        <div class="fs-gap">{{ render_field(us_setup_form.submit) }}</div>
-
-        {% if chosen_method == "authenticator" %}
-          <hr>
-          <div class="fs-center">
-            <div>
-              {{ _fsdomain("Open an authenticator app on your device and scan the following QRcode (or enter the code below manually) to start receiving codes:") }}
-            </div>
-            <div>
-              <img alt="{{ _fsdomain('Passwordless QRCode') }}" id="qrcode" src="{{ authr_qrcode }}">
-            </div>
-            <div>
-              {{ authr_key }}
-            </div>
+          <div>
+            <img alt="{{ _fsdomain('Passwordless QRCode') }}" id="qrcode" src="{{ authr_qrcode }}">
+            {# TODO: add width and heigth attrs #}%}
           </div>
-        {% endif %}
-      {% else %}
-        <h3>{{ _fsdomain("No methods have been enabled - nothing to setup") }}</h3>
+          <div>{{ authr_key }}</div>
+        </div>
       {% endif %}
-    </form>
-    {% if state %}
-      {# Completing setup by entering code #}
-      <hr class="fs-gap">
-      <div class="fs-important">{{ _fsdomain("Enter code here to complete setup") }}</div>
-      <form action="{{ url_for_security('us_setup_validate', token=state) }}" method="POST"
-          name="us_setup_validate_form">
-        {{ us_setup_validate_form.hidden_tag() }}
-        {{ render_field_with_errors(us_setup_validate_form.passcode) }}
-        <div class="fs-gap">{{ render_field(us_setup_validate_form.submit) }}</div>
-      </form>
+    {% else %}
+      <h3>{{ _fsdomain("No methods have been enabled - nothing to setup") }}</h3>
     {% endif %}
-    {% if security.webauthn %}
-      <hr class="fs-gap">
-      <h2>WebAuthn</h2>
-      <div class="fs-div">
-        {{ _fsdomain("This application supports WebAuthn security keys.") }}
-        <a href="{{ url_for_security('wan_register') }}">{{ _fsdomain("You can set them up here.") }}</a>
-      </div>
-    {% endif %}
-    {% include "security/_menu.html" %}
-{% endblock %}
+  </form>
+  {% if state %}
+    {# Completing setup by entering code #}
+    <hr class="fs-gap">
+    <div class="fs-important">{{ _fsdomain("Enter code here to complete setup") }}</div>
+    <form action="{{ url_for_security('us_setup_validate', token=state) }}" method="post" name="us_setup_validate_form">
+      {{ us_setup_validate_form.hidden_tag() }}
+      {{ render_field_with_errors(us_setup_validate_form.passcode) }}
+      <div class="fs-gap">{{ render_field(us_setup_validate_form.submit) }}</div>
+    </form>
+  {% endif %}
+  {% if security.webauthn %}
+    <hr class="fs-gap">
+    <h2>WebAuthn</h2>
+    <div class="fs-div">
+      {{ _fsdomain("This application supports WebAuthn security keys.") }}
+      <a href="{{ url_for_security('wan_register') }}">{{ _fsdomain("You can set them up here.") }}</a>
+    </div>
+  {% endif %}
+  {% include "security/_menu.html" %}
+{% endblock content %}
diff -Nru flask-security-5.1.0/flask_security/templates/security/us_signin.html flask-security-5.1.1/flask_security/templates/security/us_signin.html
--- flask-security-5.1.0/flask_security/templates/security/us_signin.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/us_signin.html	2023-03-01 20:12:52.000000000 +0100
@@ -2,34 +2,30 @@
 {% from "security/_macros.html" import render_field_with_errors, render_field, render_field_errors, render_form_errors, prop_next %}
 
 {% block content %}
-    {% include "security/_messages.html" %}
-    <h1>{{ _fsdomain("Sign In") }}</h1>
-      <form action="{{ url_for_security('us_signin') }}{{ prop_next() }}" method="POST"
-          name="us_signin_form">
-      {{ us_signin_form.hidden_tag() }}
-      {{ render_form_errors(us_signin_form) }}
-      {{ render_field_with_errors(us_signin_form.identity) }}
-      {{ render_field_with_errors(us_signin_form.passcode) }}
-      {{ render_field_with_errors(us_signin_form.remember) }}
-      {{ render_field(us_signin_form.submit) }}
-      {% if code_methods %}
-        <h4>{{ _fsdomain("Request one-time code be sent") }}</h4>
-        {% for subfield in us_signin_form.chosen_method %}
-          {% if subfield.data in code_methods %}
-            {{ render_field_with_errors(subfield) }}
-          {% endif %}
-        {% endfor %}
-        {{ render_field_errors(us_signin_form.chosen_method) }}
-        {{ render_field(us_signin_form.submit_send_code, formaction=url_for_security('us_signin_send_code')) }}
-      {% endif %}
-      </form>
+  {% include "security/_messages.html" %}
+  <h1>{{ _fsdomain("Sign In") }}</h1>
+  <form action="{{ url_for_security('us_signin') }}{{ prop_next() }}" method="post" name="us_signin_form">
+    {{ us_signin_form.hidden_tag() }}
+    {{ render_form_errors(us_signin_form) }}
+    {{ render_field_with_errors(us_signin_form.identity) }}
+    {{ render_field_with_errors(us_signin_form.passcode) }}
+    {{ render_field_with_errors(us_signin_form.remember) }}
+    {{ render_field(us_signin_form.submit) }}
+    {% if code_methods %}
+      <h4>{{ _fsdomain("Request one-time code be sent") }}</h4>
+      {% for subfield in us_signin_form.chosen_method %}
+        {% if subfield.data in code_methods %}{{ render_field_with_errors(subfield) }}{% endif %}
+      {% endfor %}
+      {{ render_field_errors(us_signin_form.chosen_method) }}
+      {{ render_field(us_signin_form.submit_send_code, formaction=url_for_security('us_signin_send_code')) }}
+    {% endif %}
+  </form>
   {% if security.webauthn %}
     <hr class="fs-gap">
     <h2>{{ _fsdomain("Use WebAuthn to Sign In") }}</h2>
-    <div>
-      <form method="GET" id="wan-signin-form" name="wan_signin_form">
-        <input id="wan_signin" name="wan_signin" type="submit" value="{{ _fsdomain('Sign in with WebAuthn') }}"
-          formaction="{{ url_for_security('wan_signin') }}{{ prop_next() }}">
+    <div class="fs-gap">
+      <form method="get" id="wan-signin-form" name="wan_signin_form">
+        <input id="wan_signin" name="wan_signin" type="submit" value="{{ _fsdomain('Sign in with WebAuthn') }}" formaction="{{ url_for_security('wan_signin') }}{{ prop_next() }}">
       </form>
     </div>
   {% endif %}
@@ -38,12 +34,11 @@
     <h2>{{ _fsdomain("Use Social Oauth to Sign In") }}</h2>
     {% for provider in security.oauthglue.provider_names %}
       <div class="fs-gap">
-        <form method="POST" id={{ provider }}-form name={{ provider }}_form>
-          <input id={{ provider }} name={{ provider }} type="submit" value="{{ _fsdomain('Sign in with ')~provider }}"
-            formaction="{{ url_for_security('oauthstart', name=provider) }}{{ prop_next() }}">
+        <form method="post" id="{{ provider }}"-form name="{{ provider }}_form">
+          <input id="{{ provider }}" name="{{ provider }}" type="submit" value="{{ _fsdomain('Sign in with ')~provider }}" formaction="{{ url_for_security('oauthstart', name=provider) }}{{ prop_next() }}">
         </form>
       </div>
     {% endfor %}
   {% endif %}
   {% include "security/_menu.html" %}
-{% endblock %}
+{% endblock content %}
diff -Nru flask-security-5.1.0/flask_security/templates/security/us_verify.html flask-security-5.1.1/flask_security/templates/security/us_verify.html
--- flask-security-5.1.0/flask_security/templates/security/us_verify.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/us_verify.html	2023-03-01 20:12:52.000000000 +0100
@@ -2,35 +2,31 @@
 {% from "security/_macros.html" import render_field_with_errors, render_field, render_field_errors, prop_next %}
 
 {% block content %}
-    {% include "security/_messages.html" %}
-    <h1>{{ _fsdomain("Please Reauthenticate") }}</h1>
-      <form action="{{ url_for_security('us_verify') }}{{ prop_next() }}" method="POST"
-          name="us_verify_form">
-      {{ us_verify_form.hidden_tag() }}
-      {{ render_field_with_errors(us_verify_form.passcode) }}
-      {{ render_field(us_verify_form.submit) }}
-      {% if code_methods %}
-        <h4>{{ _fsdomain("Request one-time code be sent") }}</h4>
-        {% for subfield in us_verify_form.chosen_method %}
-          {% if subfield.data in code_methods %}
-            {{ render_field_with_errors(subfield) }}
-          {% endif %}
-        {% endfor %}
-        {{ render_field_errors(us_verify_form.chosen_method) }}
-        {% if code_sent %}
-          <p>{{ _fsdomain("Code has been sent") }}
-        {% endif %}
-        <div class="fs-gap">{{ render_field(us_verify_form.submit_send_code, formaction=url_for_security("us_verify_send_code")~prop_next()) }}</div>
-      {% endif %}
-      </form>
-      {% if has_webauthn_verify_credential %}
-        <hr class="fs-gap">
-        <h2>{{ _fsdomain("Use a WebAuthn Security Key to Reauthenticate") }}</h2>
-        <form action="{{ url_for_security('wan_verify') }}{{ prop_next() }}" method="POST"
-          name="wan_verify_form">
-            {{ wan_verify_form.hidden_tag() }}
-            {{ render_field(wan_verify_form.submit) }}
-        </form>
-      {% endif %}
+  {% include "security/_messages.html" %}
+  <h1>{{ _fsdomain("Please Reauthenticate") }}</h1>
+  <form action="{{ url_for_security('us_verify') }}{{ prop_next() }}" method="post" name="us_verify_form">
+    {{ us_verify_form.hidden_tag() }}
+    {{ render_field_with_errors(us_verify_form.passcode) }}
+    {{ render_field(us_verify_form.submit) }}
+    {% if code_methods %}
+      <h4>{{ _fsdomain("Request one-time code be sent") }}</h4>
+      {% for subfield in us_verify_form.chosen_method %}
+        {% if subfield.data in code_methods %}{{ render_field_with_errors(subfield) }}{% endif %}
+      {% endfor %}
+      {{ render_field_errors(us_verify_form.chosen_method) }}
+      {% if code_sent %}<p>{{ _fsdomain("Code has been sent") }}</p>{% endif %}
+      <div class="fs-gap">
+        {{ render_field(us_verify_form.submit_send_code, formaction=url_for_security("us_verify_send_code")~prop_next()) }}
+      </div>
+    {% endif %}
+  </form>
+  {% if has_webauthn_verify_credential %}
+    <hr class="fs-gap">
+    <h2>{{ _fsdomain("Use a WebAuthn Security Key to Reauthenticate") }}</h2>
+    <form action="{{ url_for_security('wan_verify') }}{{ prop_next() }}" method="post" name="wan_verify_form">
+      {{ wan_verify_form.hidden_tag() }}
+      {{ render_field(wan_verify_form.submit) }}
+    </form>
+  {% endif %}
   {% include "security/_menu.html" %}
-{% endblock %}
+{% endblock content %}
diff -Nru flask-security-5.1.0/flask_security/templates/security/verify.html flask-security-5.1.1/flask_security/templates/security/verify.html
--- flask-security-5.1.0/flask_security/templates/security/verify.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/verify.html	2023-03-01 20:12:52.000000000 +0100
@@ -2,21 +2,19 @@
 {% from "security/_macros.html" import render_field_with_errors, render_field, prop_next %}
 
 {% block content %}
-    {% include "security/_messages.html" %}
-    <h1>{{ _fsdomain("Please Reauthenticate") }}</h1>
-    <form action="{{ url_for_security('verify') }}{{ prop_next() }}" method="POST"
-          name="verify_form">
-        {{ verify_form.hidden_tag() }}
-        {{ render_field_with_errors(verify_form.password) }}
-        {{ render_field(verify_form.submit) }}
+  {% include "security/_messages.html" %}
+  <h1>{{ _fsdomain("Please Reauthenticate") }}</h1>
+  <form action="{{ url_for_security('verify') }}{{ prop_next() }}" method="post" name="verify_form">
+    {{ verify_form.hidden_tag() }}
+    {{ render_field_with_errors(verify_form.password) }}
+    {{ render_field(verify_form.submit) }}
+  </form>
+  {% if has_webauthn_verify_credential %}
+    <hr class="fs-gap">
+    <h2>{{ _fsdomain("Use a WebAuthn Security Key to Reauthenticate") }}</h2>
+    <form action="{{ url_for_security('wan_verify') }}{{ prop_next() }}" method="post" name="wan_verify_form">
+      {{ wan_verify_form.hidden_tag() }}
+      {{ render_field(wan_verify_form.submit) }}
     </form>
-   {% if has_webauthn_verify_credential %}
-      <hr class="fs-gap">
-      <h2>{{ _fsdomain("Use a WebAuthn Security Key to Reauthenticate") }}</h2>
-      <form action="{{ url_for_security('wan_verify') }}{{ prop_next() }}" method="POST"
-        name="wan_verify_form">
-          {{ wan_verify_form.hidden_tag() }}
-          {{ render_field(wan_verify_form.submit) }}
-      </form>
-    {% endif %}
-{% endblock %}
+  {% endif %}
+{% endblock content %}
diff -Nru flask-security-5.1.0/flask_security/templates/security/wan_register.html flask-security-5.1.1/flask_security/templates/security/wan_register.html
--- flask-security-5.1.0/flask_security/templates/security/wan_register.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/wan_register.html	2023-03-01 20:12:52.000000000 +0100
@@ -7,8 +7,7 @@
 
 {% block head_scripts %}
   {{ super() }}
-  <script src="{{ url_for('.static', filename='js/webauthn.js') }}"
-          xmlns="http://www.w3.org/1999/html";></script>
+  <script src="{{ url_for('.static', filename='js/webauthn.js') }}" xmlns="http://www.w3.org/1999/html";></script>
   <script src="{{ url_for('.static', filename='js/base64.js') }}"></script>
 {% endblock head_scripts %}
 
@@ -18,63 +17,58 @@
   {% if not credential_options %}
     {# Initial form to get CreateOptions #}
     <div>{{ _fsdomain("Start by providing a unique name for your new security key:") }}</div>
-    <form action="{{ url_for_security('wan_register') }}" method="POST"
-            name="wan_register_form" id="wan-register-form">
-        {{ wan_register_form.hidden_tag() }}
-        {{ render_field_with_errors(wan_register_form.name) }}
-        {# Default is just second factor #}
-        {% if security.wan_allow_as_first_factor %}
-          <div>
-          {% for subfield in wan_register_form.usage %}
-            {{ render_field_with_errors(subfield) }}
-          {% endfor %}
-          </div>
-        {% endif %}
-        {{ render_field(wan_register_form.submit) }}
+    <form action="{{ url_for_security('wan_register') }}" method="post" name="wan_register_form" id="wan-register-form">
+      {{ wan_register_form.hidden_tag() }}
+      {{ render_field_with_errors(wan_register_form.name) }}
+      {# Default is just second factor #}
+      {% if security.wan_allow_as_first_factor %}
+        <div>
+          {% for subfield in wan_register_form.usage %}{{ render_field_with_errors(subfield) }}{% endfor %}
+        </div>
+      {% endif %}
+      {{ render_field(wan_register_form.submit) }}
     </form>
   {% else %}
-    <form action="{{ url_for_security('wan_register_response', token=wan_state) }}" method="POST"
-          name="wan_register_response_form" id="wan-register-response-form">
+    <form action="{{ url_for_security('wan_register_response', token=wan_state) }}" method="post" name="wan_register_response_form" id="wan-register-response-form">
       {{ wan_register_response_form.hidden_tag() }}
       <div id="wan-errors"></div>
     </form>
-      <script type="text/javascript">
-        handleRegister('{{ credential_options|safe }}')
-          .then((result) => {
-            if (result.error_msg) {
-              const error_element = document.getElementById("wan-errors")
-              error_element.innerHTML = `<em>${result.error_msg}</em`
-            } else {
-              document.getElementById("credential").value = result.credential
-              {# We auto-submit this form - there is a Submit button on the
-                 form we could use - but there really isn't any reason to force the
-                 user to click yet another button
-               #}
-              document.forms["wan-register-response-form"].submit()
-            }
-          })
-      </script>
+    <script type="text/javascript">
+      handleRegister('{{ credential_options|safe }}')
+        .then((result) => {
+          if (result.error_msg) {
+            const error_element = document.getElementById("wan-errors");
+            error_element.innerHTML = `<em>${result.error_msg}</em>`;
+          } else {
+            document.getElementById("credential").value = result.credential;
+            {# We auto-submit this form - there is a Submit button on the
+                form we could use - but there really isn't any reason to force the
+                user to click yet another button
+            #}
+            document.forms["wan-register-response-form"].submit();
+          }
+        });
+    </script>
   {% endif %}
-
   {% if registered_credentials %}
     <h3>{{ _fsdomain("Currently registered security keys:") }}</h3>
     {% set listing = _fsdomain('Nickname: "%s" Usage: "%s" Transports: "%s" Discoverable: "%s" Device Type: "%s" Backed up? "%s" Last used on: %s') %}
     <ul>
       {% for cred in registered_credentials %}
-        <li>{{ listing|format(cred.name, cred.usage, cred.transports|join(", "), cred.discoverable, cred.device_type, cred.backup_state, cred.lastuse)}}</li>
+        <li>
+          {{ listing|format(cred.name, cred.usage, cred.transports|join(", "), cred.discoverable, cred.device_type, cred.backup_state, cred.lastuse) }}
+        </li>
       {% endfor %}
     </ul>
   {% endif %}
-
   {% if wan_delete_form %}
     <hr>
     <h2>{{ _fsdomain("Delete Existing WebAuthn Security Key") }}</h2>
-      <form action="{{ url_for_security('wan_delete') }}" method="POST"
-            name="wan_delete_form">
-        {{ wan_delete_form.hidden_tag() }}
-        {{ render_field_with_errors(wan_delete_form.name) }}
-        {{ render_field(wan_delete_form.submit) }}
-      </form>
+    <form action="{{ url_for_security('wan_delete') }}" method="post" name="wan_delete_form">
+      {{ wan_delete_form.hidden_tag() }}
+      {{ render_field_with_errors(wan_delete_form.name) }}
+      {{ render_field(wan_delete_form.submit) }}
+    </form>
   {% endif %}
   {% if security.support_mfa and security.multi_factor_recovery_codes %}
     <hr>
@@ -83,6 +77,6 @@
       {{ _fsdomain("This application supports setting up recovery codes.") }}
       <a href="{{ url_for_security('mf_recovery_codes') }}">{{ _fsdomain("You can set them up here.") }}</a>
     </div>
-    {% endif %}
+  {% endif %}
   {% include "security/_menu.html" %}
-{% endblock %}
+{% endblock content %}
diff -Nru flask-security-5.1.0/flask_security/templates/security/wan_signin.html flask-security-5.1.1/flask_security/templates/security/wan_signin.html
--- flask-security-5.1.0/flask_security/templates/security/wan_signin.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/wan_signin.html	2023-03-01 20:12:52.000000000 +0100
@@ -7,8 +7,7 @@
 
 {% block head_scripts %}
   {{ super() }}
-  <script src="{{ url_for('.static', filename='js/webauthn.js') }}"
-          xmlns="http://www.w3.org/1999/html";></script>
+  <script src="{{ url_for('.static', filename='js/webauthn.js') }}" xmlns="http://www.w3.org/1999/html";></script>
   <script src="{{ url_for('.static', filename='js/base64.js') }}"></script>
 {% endblock head_scripts %}
 
@@ -20,8 +19,7 @@
     <h1>{{ _fsdomain("Use Your WebAuthn Security Key as a Second Factor") }}</h1>
   {% endif %}
   {% if not credential_options %}
-    <form action="{{ url_for_security('wan_signin') }}{{ prop_next() }}" method="POST"
-          name="wan_signin_form" id="wan-signin-form">
+    <form action="{{ url_for_security('wan_signin') }}{{ prop_next() }}" method="post" name="wan_signin_form" id="wan-signin-form">
       {{ wan_signin_form.hidden_tag() }}
       {% if not is_secondary %}
         {{ render_field_with_errors(wan_signin_form.identity) }}
@@ -31,8 +29,7 @@
       {{ render_field(wan_signin_form.submit) }}
     </form>
   {% else %}
-    <form action="{{ url_for_security('wan_signin_response', token=wan_state) }}{{ prop_next() }}" method="POST"
-          name="wan_signin_response_form" id="wan-signin-response-form">
+    <form action="{{ url_for_security('wan_signin_response', token=wan_state) }}{{ prop_next() }}" method="post" name="wan_signin_response_form" id="wan-signin-response-form">
       {{ wan_signin_response_form.hidden_tag() }}
       {{ render_field_errors(wan_signin_form.remember) }}
       {#  the following is important even though it is hidden - some browsers
@@ -41,21 +38,21 @@
       {{ render_field(wan_signin_response_form.credential) }}
       <div id="wan-errors"></div>
     </form>
-      <script type="text/javascript">
-        handleSignin('{{ credential_options|safe }}')
+    <script type="text/javascript">
+      handleSignin('{{ credential_options|safe }}')
         .then((result) => {
           if (result.error_msg) {
-            const error_element = document.getElementById("wan-errors")
-            error_element.innerHTML = `<em>${result.error_msg}</em`
+            const error_element = document.getElementById("wan-errors");
+            error_element.innerHTML = `<em>${result.error_msg}</em>`;
           } else {
-            document.getElementById("credential").value = result.credential
+            document.getElementById("credential").value = result.credential;
             {# We auto-submit this form - there is a Submit button on the
-               form we could use - but there really isn't any reason to force the
-               user to click yet another button
-             #}
-            document.forms["wan-signin-response-form"].submit()
+                form we could use - but there really isn't any reason to force the
+                user to click yet another button
+              #}
+            document.forms["wan-signin-response-form"].submit();
           }
-        })
-      </script>
+        });
+    </script>
   {% endif %}
-{% endblock %}
+{% endblock content %}
diff -Nru flask-security-5.1.0/flask_security/templates/security/wan_verify.html flask-security-5.1.1/flask_security/templates/security/wan_verify.html
--- flask-security-5.1.0/flask_security/templates/security/wan_verify.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/templates/security/wan_verify.html	2023-03-01 20:12:52.000000000 +0100
@@ -12,8 +12,7 @@
 
 {% block head_scripts %}
   {{ super() }}
-  <script src="{{ url_for('.static', filename='js/webauthn.js') }}"
-          xmlns="http://www.w3.org/1999/html";></script>
+  <script src="{{ url_for('.static', filename='js/webauthn.js') }}" xmlns="http://www.w3.org/1999/html";></script>
   <script src="{{ url_for('.static', filename='js/base64.js') }}"></script>
 {% endblock head_scripts %}
 
@@ -21,32 +20,30 @@
   {% include "security/_messages.html" %}
   <h1>{{ _fsdomain("Please Re-Authenticate Using Your WebAuthn Security Key") }}</h1>
   {% if not credential_options %}
-    <form action="{{ url_for_security('wan_verify') }}{{ prop_next() }}" method="POST"
-          name="wan_verify_form">
-        {{ wan_verify_form.hidden_tag() }}
-        {{ render_field(wan_verify_form.submit) }}
+    <form action="{{ url_for_security('wan_verify') }}{{ prop_next() }}" method="post" name="wan_verify_form">
+      {{ wan_verify_form.hidden_tag() }}
+      {{ render_field(wan_verify_form.submit) }}
     </form>
   {% else %}
-    <form action="{{ url_for_security('wan_verify_response', token=wan_state) }}{{ prop_next() }}" method="POST"
-          name="wan_signin_response_form" id="wan-signin-response-form">
+    <form action="{{ url_for_security('wan_verify_response', token=wan_state) }}{{ prop_next() }}" method="post" name="wan_signin_response_form" id="wan-signin-response-form">
       {{ wan_signin_response_form.hidden_tag() }}
       <div id="wan-errors"></div>
     </form>
-      <script type="text/javascript">
-        handleSignin('{{ credential_options|safe }}')
+    <script type="text/javascript">
+      handleSignin('{{ credential_options|safe }}')
         .then((result) => {
           if (result.credential) {
-            document.getElementById("credential").value = result.credential
+            document.getElementById("credential").value = result.credential;
             {# We auto-submit this form - there is a Submit button on the
-               form we could use - but there really isn't any reason to force the
-               user to click yet another button
-             #}
-            document.forms["wan-signin-response-form"].submit()
+                form we could use - but there really isn't any reason to force the
+                user to click yet another button
+              #}
+            document.forms["wan-signin-response-form"].submit();
           } else {
-            const error_element = document.getElementById("wan-errors")
-            error_element.innerHTML = `<em>${result.error_msg}</em`
+            const error_element = document.getElementById("wan-errors");
+            error_element.innerHTML = `<em>${result.error_msg}</em>`;
           }
-        })
-      </script>
+        });
+    </script>
   {% endif %}
-{% endblock %}
+{% endblock content %}
diff -Nru flask-security-5.1.0/flask_security/translations/ru_RU/LC_MESSAGES/flask_security.po flask-security-5.1.1/flask_security/translations/ru_RU/LC_MESSAGES/flask_security.po
--- flask-security-5.1.0/flask_security/translations/ru_RU/LC_MESSAGES/flask_security.po	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/translations/ru_RU/LC_MESSAGES/flask_security.po	2023-03-01 20:12:52.000000000 +0100
@@ -9,16 +9,17 @@
 "Project-Id-Version: Flask-Security 2.0.1\n"
 "Report-Msgid-Bugs-To: info@inveniosoftware.org\n"
 "POT-Creation-Date: 2023-01-23 15:51-0800\n"
-"PO-Revision-Date: 2022-04-10 23:19+0300\n"
+"PO-Revision-Date: 2023-01-25 04:14+0530\n"
 "Last-Translator: Ivan Fedorov <inbox@titaniumhocker.ru>\n"
-"Language: ru_RU\n"
 "Language-Team: Leonid R. <leovp@users.noreply.github.com>\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
-"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Language: ru_RU\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 "
+"&& (n%100<10 || n%100>=20) ? 1 : 2);\n"
 "Generated-By: Babel 2.11.0\n"
+"X-Generator: Poedit 3.2.2\n"
 
 #: flask_security/core.py:266
 msgid "Login Required"
@@ -73,16 +74,19 @@
 #: flask_security/core.py:372
 msgid "Authentication failed - identity or password/passcode invalid"
 msgstr ""
+"Аутентификация не удалась — идентификатор или пароль/код доступа недействительны"
 
 #: flask_security/core.py:376
 msgid ""
-"If that email address is in our system, you will receive an email "
-"describing how to reset your password."
+"If that email address is in our system, you will receive an email describing how "
+"to reset your password."
 msgstr ""
+"Если этот адрес электронной почты есть в нашей системе, вы получите письмо с "
+"описанием того, как сбросить пароль."
 
 #: flask_security/core.py:383
 msgid "If that identity is in our system, you were sent a code."
-msgstr ""
+msgstr "Если этот идентификатор есть в нашей системе, вам был выслан код."
 
 #: flask_security/core.py:386
 msgid "You do not have permission to view this resource."
@@ -90,7 +94,7 @@
 
 #: flask_security/core.py:388
 msgid "You are not authenticated. Please supply the correct credentials."
-msgstr "Вы не аутентифицированы. Пожалуйста, укажите корректные учетные данные."
+msgstr "Вы не аутентифицированы. Пожалуйста, укажите корректные учётные данные."
 
 #: flask_security/core.py:392
 msgid "You must re-authenticate to access this endpoint"
@@ -99,7 +103,7 @@
 #: flask_security/core.py:396
 #, python-format
 msgid "Thank you. Confirmation instructions have been sent to %(email)s."
-msgstr "Спасибо. Инструкция по подтверждению аккаунта отправлена на %(email)s."
+msgstr "Спасибо. Инструкции по подтверждению были отправлены на %(email)s."
 
 #: flask_security/core.py:399
 msgid "Thank you. Your email has been confirmed."
@@ -121,22 +125,23 @@
 #: flask_security/core.py:407
 #, python-format
 msgid ""
-"Identity attribute '%(attr)s' with value '%(value)s' is already "
-"associated with an account."
+"Identity attribute '%(attr)s' with value '%(value)s' is already associated with "
+"an account."
 msgstr ""
-"Идентификационный атрибут '%(attr)s' со значением '%(value)s' уже "
-"ассоциирован с учетной записью."
+"Идентификационный атрибут '%(attr)s' со значением '%(value)s' уже ассоциирован с "
+"учетной записью."
 
 #: flask_security/core.py:414
 #, python-format
 msgid "Identity %(id)s not registered"
-msgstr ""
+msgstr "Идентификация %(id)s не зарегистрирована"
 
 #: flask_security/core.py:418
 msgid ""
-"An error occurred while communicating with the Oauth provider. Please try"
-" again."
+"An error occurred while communicating with the Oauth provider. Please try again."
 msgstr ""
+"Произошла ошибка при взаимодействии с провайдером Oauth. Пожалуйста, попробуйте "
+"ещё раз."
 
 #: flask_security/core.py:424
 msgid "Password does not match"
@@ -152,25 +157,25 @@
 
 #: flask_security/core.py:427
 msgid "Recovery code invalid"
-msgstr ""
+msgstr "Код восстановления недействителен"
 
 #: flask_security/core.py:428
 msgid "No recovery codes generated yet"
-msgstr ""
+msgstr "Коды восстановления еще не сгенерированы"
 
 #: flask_security/core.py:430
 #, python-format
 msgid "Instructions to reset your password have been sent to %(email)s."
-msgstr "Инструкция по восстановлению пароля отправлена на %(email)s."
+msgstr "Инструкции по восстановлению пароля были отправлены на %(email)s."
 
 #: flask_security/core.py:434
 #, python-format
 msgid ""
-"You did not reset your password within %(within)s. New instructions have "
-"been sent to %(email)s."
+"You did not reset your password within %(within)s. New instructions have been "
+"sent to %(email)s."
 msgstr ""
-"Вы не восстановили пароль в течение %(within)s. Новая инструкция "
-"отправлена на %(email)s."
+"Вы не восстановили пароль в течение %(within)s. Новые инструкции были отправлены "
+"на %(email)s."
 
 #: flask_security/core.py:440
 msgid "Invalid reset password token."
@@ -183,30 +188,30 @@
 #: flask_security/core.py:443
 #, python-format
 msgid "Confirmation instructions have been sent to %(email)s."
-msgstr "Инструкция по подтверждению аккаунта отправлена на %(email)s."
+msgstr "Инструкции по подтверждению были отправлены на %(email)s."
 
 #: flask_security/core.py:447
 #, python-format
 msgid ""
-"You did not confirm your email within %(within)s. New instructions to "
-"confirm your email have been sent to %(email)s."
+"You did not confirm your email within %(within)s. New instructions to confirm "
+"your email have been sent to %(email)s."
 msgstr ""
-"Вы не подтвердили свой почтовый адрес в течение %(within)s. Новая "
-"инструкция по подтверждению отправлена на %(email)s."
+"Вы не подтвердили свой почтовый адрес в течение %(within)s. Новые инструкции по "
+"подтверждению отправлены на %(email)s."
 
 #: flask_security/core.py:455
 #, python-format
 msgid ""
-"You did not login within %(within)s. New instructions to login have been "
-"sent to %(email)s."
+"You did not login within %(within)s. New instructions to login have been sent to "
+"%(email)s."
 msgstr ""
-"Вы не вошли в течение %(within)s. Новая инструкция по входу отправлена на"
-" %(email)s."
+"Вы не вошли в течение %(within)s. Новые инструкции по входу отправлены на "
+"%(email)s."
 
 #: flask_security/core.py:462
 #, python-format
 msgid "Instructions to login have been sent to %(email)s."
-msgstr "Инструкция по входу отправлена на %(email)s."
+msgstr "Инструкции по входу отправлены на %(email)s."
 
 #: flask_security/core.py:465
 msgid "Invalid login token."
@@ -251,7 +256,7 @@
 
 #: flask_security/core.py:481
 msgid "Phone number not valid e.g. missing country code"
-msgstr "Номер телефона некорректен, например отсутствует код страны"
+msgstr "Номер телефона некорректен, например, отсутствует код страны"
 
 #: flask_security/core.py:482
 msgid "Specified user does not exist"
@@ -267,7 +272,7 @@
 
 #: flask_security/core.py:485
 msgid "You have successfully logged in."
-msgstr "Вы вошли."
+msgstr "Вы успешно вошли в систему."
 
 #: flask_security/core.py:486
 msgid "Forgot password?"
@@ -275,9 +280,8 @@
 
 #: flask_security/core.py:488
 msgid ""
-"You successfully reset your password and you have been logged in "
-"automatically."
-msgstr "Ваш пароль был восстановлен и вы автоматически вошли."
+"You successfully reset your password and you have been logged in automatically."
+msgstr "Вы успешно сбросили пароль и автоматически вошли в систему."
 
 #: flask_security/core.py:495
 msgid "Your new password must be different than your previous password."
@@ -285,7 +289,7 @@
 
 #: flask_security/core.py:498
 msgid "You successfully changed your password."
-msgstr "Вы удачно сменили пароль."
+msgstr "Вы успешно изменили свой пароль."
 
 #: flask_security/core.py:499
 msgid "Please log in to access this page."
@@ -293,11 +297,11 @@
 
 #: flask_security/core.py:500
 msgid "Please reauthenticate to access this page."
-msgstr "Пожалуйста, войдите заново чтобы получить доступ к этой странице."
+msgstr "Пожалуйста, войдите заново, чтобы получить доступ к этой странице."
 
 #: flask_security/core.py:501
 msgid "Reauthentication successful"
-msgstr "Повторный вход прошел успешно"
+msgstr "Повторный вход выполнен успешно"
 
 #: flask_security/core.py:503
 msgid "You can only access this endpoint when not logged in."
@@ -305,7 +309,7 @@
 
 #: flask_security/core.py:506
 msgid "Code has been sent."
-msgstr ""
+msgstr "Код отправлен."
 
 #: flask_security/core.py:507
 msgid "Failed to send code. Please try again later"
@@ -313,7 +317,7 @@
 
 #: flask_security/core.py:509
 msgid "Your code has been confirmed"
-msgstr ""
+msgstr "Ваш код был подтвержден"
 
 #: flask_security/core.py:511
 msgid "You successfully changed your two-factor method."
@@ -339,8 +343,7 @@
 #, python-format
 msgid "Setup must be completed within %(within)s. Please start over."
 msgstr ""
-"Настройка должна быть завершена в течение %(within)s. Пожалуйста, начните"
-" заново."
+"Настройка должна быть завершена в течение %(within)s. Пожалуйста, начните заново."
 
 #: flask_security/core.py:528
 msgid "Unified sign in setup successful"
@@ -358,11 +361,9 @@
 #: flask_security/core.py:532
 #, python-format
 msgid ""
-"Username must be at least %(min)d characters and less than %(max)d "
-"characters"
+"Username must be at least %(min)d characters and less than %(max)d characters"
 msgstr ""
-"Имя пользователя должно содержать не менее %(min)d и не более %(max)d "
-"символов"
+"Имя пользователя должно содержать не менее %(min)d и не более %(max)d символов"
 
 #: flask_security/core.py:539
 msgid "Username contains illegal characters"
@@ -374,28 +375,28 @@
 
 #: flask_security/core.py:546
 msgid "Username not provided"
-msgstr "Имя пользователя не предоставлено"
+msgstr "Имя пользователя не указано"
 
 #: flask_security/core.py:548
 #, python-format
 msgid "%(username)s is already associated with an account."
-msgstr "Имя пользователя %(username)s уже связано с учетной записью."
+msgstr "Имя пользователя %(username)s уже связано с учётной записью."
 
 #: flask_security/core.py:552
 #, python-format
 msgid "WebAuthn operation must be completed within %(within)s. Please start over."
 msgstr ""
-"Операция WebAuthn должна быть завершена в течение %(within)s. Пожалуйста,"
-" начните сначала."
+"Операция WebAuthn должна быть завершена в течение %(within)s. Пожалуйста, "
+"начните сначала."
 
 #: flask_security/core.py:556
 msgid "Nickname for new credential is required."
-msgstr "Требуется псевдоним для новых учетных данных."
+msgstr "Требуется псевдоним для новых учётных данных."
 
 #: flask_security/core.py:560
 #, python-format
 msgid "%(name)s is already associated with a credential."
-msgstr "%(name)s уже связан с учетными данными."
+msgstr "%(name)s уже связан с учётными данными."
 
 #: flask_security/core.py:564
 #, python-format
@@ -405,16 +406,16 @@
 #: flask_security/core.py:568
 #, python-format
 msgid "Successfully deleted WebAuthn credential with name: %(name)s"
-msgstr "Учетные данные WebAuthn с именем %(name)s успешно удалены"
+msgstr "Учётные данные WebAuthn с именем %(name)s успешно удалены"
 
 #: flask_security/core.py:572
 #, python-format
 msgid "Successfully added WebAuthn credential with name: %(name)s"
-msgstr "Учетные данные WebAuthn с именем %(name)s успешно добавлены"
+msgstr "Учётные данные WebAuthn с именем %(name)s успешно добавлены"
 
 #: flask_security/core.py:576
 msgid "WebAuthn credential id already registered."
-msgstr "Учетные данные WebAuthn уже зарегистрированы."
+msgstr "Учётные данные WebAuthn уже зарегистрированы."
 
 #: flask_security/core.py:580
 msgid "Unregistered WebAuthn credential id."
@@ -422,22 +423,22 @@
 
 #: flask_security/core.py:584
 msgid "WebAuthn credential doesn't belong to any user."
-msgstr "Учетные данные WebAuthn не принадлежат ни одному из пользователей."
+msgstr "Учётные данные WebAuthn не принадлежат ни одному пользователю."
 
 #: flask_security/core.py:588
 #, python-format
 msgid "Could not verify WebAuthn credential: %(cause)s."
-msgstr "Не удалось проверить учетные данные WebAuthn: %(cause)s."
+msgstr "Не удалось проверить учётные данные WebAuthn: %(cause)s."
 
 #: flask_security/core.py:592
 msgid "Credential not registered for this use (first or secondary)"
 msgstr ""
-"Учетные данные не зарегистрированы для этого использования (первичное или"
-" вторичное)"
+"Учётные данные не зарегистрированы для этого использования (первичное или "
+"вторичное)"
 
 #: flask_security/core.py:596
 msgid "Credential user handle didn't match"
-msgstr ""
+msgstr "Несовпадение учётных данных пользователя"
 
 #: flask_security/forms.py:58
 msgid "Email Address"
@@ -470,7 +471,7 @@
 
 #: flask_security/forms.py:64
 msgid "Resend Confirmation Instructions"
-msgstr "Заново отправить инструкцию по подтверждению аккаунта"
+msgstr "Отправить повторно инструкции по подтверждению аккаунта"
 
 #: flask_security/forms.py:65
 msgid "Recover Password"
@@ -522,7 +523,7 @@
 
 #: flask_security/forms.py:77
 msgid "Error(s)"
-msgstr "Ошибка"
+msgstr "Ошибка(и)"
 
 #: flask_security/forms.py:78
 msgid "Identity"
@@ -551,8 +552,8 @@
 #: flask_security/forms.py:84
 msgid "Set up using an authenticator app (e.g. google, lastpass, authy)"
 msgstr ""
-"Настроить с помощью приложения для аутентификации (например google, "
-"lastpass, authy)"
+"Настроить с помощью приложения для аутентификации (например google, lastpass, "
+"authy)"
 
 #: flask_security/forms.py:87
 msgid "Set up using SMS"
@@ -564,15 +565,15 @@
 
 #: flask_security/recovery_codes.py:125
 msgid "Show Recovery Codes"
-msgstr ""
+msgstr "Показать коды восстановления"
 
 #: flask_security/recovery_codes.py:127
 msgid "Generate New Recovery Codes"
-msgstr ""
+msgstr "Генерация новых кодов восстановления"
 
 #: flask_security/recovery_codes.py:143
 msgid "Recovery Code"
-msgstr ""
+msgstr "Код восстановления"
 
 #: flask_security/tf_plugin.py:50
 msgid "Available Second Factor Methods:"
@@ -604,7 +605,7 @@
 
 #: flask_security/unified_signin.py:305
 msgid "Delete active sign in option"
-msgstr ""
+msgstr "Удаление активной опции входа"
 
 #: flask_security/webauthn.py:118 flask_security/webauthn.py:344
 msgid "Nickname"
@@ -668,15 +669,15 @@
 
 #: flask_security/templates/security/change_password.html:12
 msgid "You do not currently have a password - this will add one."
-msgstr ""
+msgstr "В настоящее время у вас нет пароля — это добавит его."
 
 #: flask_security/templates/security/forgot_password.html:6
 msgid "Send password reset instructions"
-msgstr "Отправить инструкцию по сбросу пароля"
+msgstr "Отправить инструкции по сбросу пароля"
 
 #: flask_security/templates/security/login_user.html:15
 msgid "or"
-msgstr ""
+msgstr "или"
 
 #: flask_security/templates/security/login_user.html:27
 #: flask_security/templates/security/us_signin.html:28
@@ -686,37 +687,38 @@
 #: flask_security/templates/security/login_user.html:30
 #: flask_security/templates/security/us_signin.html:31
 msgid "Sign in with WebAuthn"
-msgstr "Зарегистрироваться с помощью WebAuthn"
+msgstr "Войти с помощью WebAuthn"
 
 #: flask_security/templates/security/login_user.html:37
 #: flask_security/templates/security/us_signin.html:38
 msgid "Use Social Oauth to Sign In"
-msgstr ""
+msgstr "Использовать Social Oauth для входа"
 
 #: flask_security/templates/security/login_user.html:41
 #: flask_security/templates/security/us_signin.html:42
 msgid "Sign in with "
-msgstr ""
+msgstr "Войти с помощью "
 
 #: flask_security/templates/security/mf_recovery.html:6
 msgid "Enter Recovery Code"
-msgstr ""
+msgstr "Введите код восстановления"
 
 #: flask_security/templates/security/mf_recovery_codes.html:6
 #: flask_security/templates/security/two_factor_setup.html:79
 #: flask_security/templates/security/wan_register.html:81
 msgid "Recovery Codes"
-msgstr ""
+msgstr "Коды восстановления"
 
 #: flask_security/templates/security/mf_recovery_codes.html:14
 msgid ""
-"Be sure to copy these and store in a safe place. Each code can be used "
-"only once."
+"Be sure to copy these and store in a safe place. Each code can be used only once."
 msgstr ""
+"Обязательно скопируйте их и храните в надёжном месте. Каждый код может быть "
+"использован только один раз."
 
 #: flask_security/templates/security/mf_recovery_codes.html:24
 msgid "Generate new Recovery Codes"
-msgstr ""
+msgstr "Генерация новых кодов восстановления"
 
 #: flask_security/templates/security/reset_password.html:6
 msgid "Reset password"
@@ -724,7 +726,7 @@
 
 #: flask_security/templates/security/send_confirmation.html:6
 msgid "Resend confirmation instructions"
-msgstr "Заново отправить инструкцию по подтверждению аккаунта"
+msgstr "Заново отправить инструкции по подтверждению"
 
 #: flask_security/templates/security/two_factor_select.html:6
 msgid "Select Two Factor Method"
@@ -733,35 +735,30 @@
 #: flask_security/templates/security/two_factor_setup.html:24
 msgid "Two-factor authentication adds an extra layer of security to your account"
 msgstr ""
-"Двухфакторная аутентификация добавляет дополнительный уровень "
-"безопасности для вашей учетной записи"
+"Двухфакторная аутентификация добавляет дополнительный уровень безопасности для "
+"вашей учётной записи"
 
 #: flask_security/templates/security/two_factor_setup.html:25
 msgid "In addition to your username and password, you'll need to use a code."
-msgstr ""
-"В дополнение к вашему имени пользователя и паролю вам нужно будет "
-"использовать код."
+msgstr "Помимо имени пользователя и пароля, вам нужно будет использовать код."
 
 #: flask_security/templates/security/two_factor_setup.html:28
 #, python-format
 msgid "Currently setup two-factor method: %(method)s"
-msgstr ""
+msgstr "Текущий настроенный двухфакторный метод: %(method)s"
 
 #: flask_security/templates/security/two_factor_setup.html:38
 msgid "To complete logging in, please enter the code sent to your mail"
-msgstr ""
-"Для завершения авторизации введите код, отправленный на вашу электронную "
-"почту"
+msgstr "Для завершения входа введите код, отправленный на вашу электронную почту"
 
 #: flask_security/templates/security/two_factor_setup.html:44
 #: flask_security/templates/security/us_setup.html:71
 msgid ""
-"Open an authenticator app on your device and scan the following QRcode "
-"(or enter the code below manually) to start receiving codes:"
+"Open an authenticator app on your device and scan the following QRcode (or enter "
+"the code below manually) to start receiving codes:"
 msgstr ""
-"Откройте приложение для аутентификации на вашем устройстве и "
-"просканируйте следующий QR-код (или введите код ниже вручную), чтобы "
-"начать получать коды:"
+"Откройте приложение аутентификатора на вашем устройстве и просканируйте "
+"следующий QR-код (или введите код ниже вручную), чтобы начать получать коды:"
 
 #: flask_security/templates/security/two_factor_setup.html:47
 msgid "Two factor authentication code"
@@ -773,12 +770,12 @@
 
 #: flask_security/templates/security/two_factor_setup.html:62
 msgid "WebAuthn"
-msgstr ""
+msgstr "WebAuthn"
 
 #: flask_security/templates/security/two_factor_setup.html:64
 #: flask_security/templates/security/us_setup.html:100
 msgid "This application supports WebAuthn security keys."
-msgstr "Данное приложение поддерживает ключи для WebAuthn."
+msgstr "Это приложение поддерживает ключи безопасности WebAuthn."
 
 #: flask_security/templates/security/two_factor_setup.html:65
 #: flask_security/templates/security/two_factor_setup.html:82
@@ -790,7 +787,7 @@
 #: flask_security/templates/security/two_factor_setup.html:81
 #: flask_security/templates/security/wan_register.html:83
 msgid "This application supports setting up recovery codes."
-msgstr ""
+msgstr "Это приложение поддерживает настройку кодов восстановления."
 
 #: flask_security/templates/security/two_factor_verify_code.html:6
 msgid "Two-factor Authentication"
@@ -815,7 +812,7 @@
 
 #: flask_security/templates/security/us_setup.html:34
 msgid "Currently active sign in options:"
-msgstr ""
+msgstr "Активные на данный момент варианты входа в систему:"
 
 #: flask_security/templates/security/us_setup.html:74
 msgid "Passwordless QRCode"
@@ -823,11 +820,11 @@
 
 #: flask_security/templates/security/us_setup.html:82
 msgid "No methods have been enabled - nothing to setup"
-msgstr "Ни один из методов не был включен - нечего настраивать"
+msgstr "Никакие методы не были включены — нечего настраивать"
 
 #: flask_security/templates/security/us_setup.html:88
 msgid "Enter code here to complete setup"
-msgstr ""
+msgstr "Введите код, чтобы завершить настройку"
 
 #: flask_security/templates/security/us_signin.html:16
 #: flask_security/templates/security/us_verify.html:13
@@ -855,8 +852,7 @@
 #: flask_security/templates/security/wan_register.html:20
 msgid "Start by providing a unique name for your new security key:"
 msgstr ""
-"Начните с предоставления уникального имени для вашего нового ключа "
-"безопасности:"
+"Начните с предоставления уникального имени для вашего нового ключа безопасности:"
 
 #: flask_security/templates/security/wan_register.html:60
 msgid "Currently registered security keys:"
@@ -865,9 +861,11 @@
 #: flask_security/templates/security/wan_register.html:61
 #, python-format
 msgid ""
-"Nickname: \"%s\" Usage: \"%s\" Transports: \"%s\" Discoverable: \"%s\" "
-"Device Type: \"%s\" Backed up? \"%s\" Last used on: %s"
+"Nickname: \"%s\" Usage: \"%s\" Transports: \"%s\" Discoverable: \"%s\" Device "
+"Type: \"%s\" Backed up? \"%s\" Last used on: %s"
 msgstr ""
+"Прозвище: «%s» Использование: «%s» Транспорты: «%s» Обнаруживаемость: «%s» Тип "
+"устройства: «%s» Резервное копирование «%s» Последнее использование: %s"
 
 #: flask_security/templates/security/wan_register.html:71
 msgid "Delete Existing WebAuthn Security Key"
@@ -880,8 +878,8 @@
 #: flask_security/templates/security/wan_signin.html:20
 msgid "Use Your WebAuthn Security Key as a Second Factor"
 msgstr ""
-"Использовать ваш ключ безопасности WebAuthn как вторичный метод "
-"духфакторной аутентификации"
+"Использовать ваш ключ безопасности WebAuthn как вторичный метод духфакторной "
+"аутентификации"
 
 #: flask_security/templates/security/wan_verify.html:22
 msgid "Please Re-Authenticate Using Your WebAuthn Security Key"
@@ -903,13 +901,12 @@
 #: flask_security/templates/security/email/change_notice.txt:3
 msgid "If you did not change your password, click the link below to reset it."
 msgstr ""
-"Если вы не меняли свой пароль, то нажмите на ссылку ниже для сброса "
-"пароля."
+"Если вы не меняли свой пароль, то нажмите на ссылку ниже для сброса пароля."
 
 #: flask_security/templates/security/email/confirmation_instructions.html:8
 #: flask_security/templates/security/email/confirmation_instructions.txt:8
 msgid "Please confirm your email through the link below:"
-msgstr "Пожалуйста, подтвердите свой почтовый адрес перейдя по ссылке:"
+msgstr "Пожалуйста, подтвердите свой email перейдя по ссылке:"
 
 #: flask_security/templates/security/email/confirmation_instructions.html:10
 #: flask_security/templates/security/email/welcome.html:13
@@ -944,7 +941,7 @@
 #: flask_security/templates/security/email/two_factor_instructions.html:3
 #: flask_security/templates/security/email/two_factor_instructions.txt:3
 msgid "You can log into your account using the following code:"
-msgstr "Вы можете войти в свою учетную запись с помощью следующего кода:"
+msgstr "Вы можете войти в свою учётную запись с помощью следующего кода:"
 
 #: flask_security/templates/security/email/two_factor_rescue.html:1
 #: flask_security/templates/security/email/two_factor_rescue.txt:1
@@ -972,75 +969,75 @@
 #: flask_security/templates/security/email/welcome_existing_username.txt:11
 #, python-format
 msgid "Hello %(email)s!"
-msgstr ""
+msgstr "Здравствуйте %(email)s!"
 
 #: flask_security/templates/security/email/welcome_existing.html:13
 #: flask_security/templates/security/email/welcome_existing.txt:13
 msgid ""
-"Someone (you?) tried to register this email - which is already in our "
-"system."
+"Someone (you?) tried to register this email - which is already in our system."
 msgstr ""
+"Кто-то (вы?) попытался зарегистрировать этот email, который уже есть в нашей "
+"системе."
 
 #: flask_security/templates/security/email/welcome_existing.html:16
 #, python-format
 msgid ""
-"This account also has the following username associated with it: "
-"%(username)s."
+"This account also has the following username associated with it: %(username)s."
 msgstr ""
+"С этой учетной записью также связано следующее имя пользователя: %(username)s."
 
 #: flask_security/templates/security/email/welcome_existing.html:20
 msgid "If you forgot your password you can reset it"
-msgstr ""
+msgstr "Если вы забыли свой пароль, вы можете восстановить его"
 
 #: flask_security/templates/security/email/welcome_existing.html:21
 msgid " here."
-msgstr ""
+msgstr " тут."
 
 #: flask_security/templates/security/email/welcome_existing.txt:16
 #, python-format
 msgid ""
-"This account also has the following username associated with it: "
-"%(username)s"
+"This account also has the following username associated with it: %(username)s"
 msgstr ""
+"Эта учётная запись также имеет следующее имя пользователя, связанное с: "
+"%(username)s"
 
 #: flask_security/templates/security/email/welcome_existing.txt:20
 msgid "If you forgot your password you can reset it with the following link:"
 msgstr ""
+"Если вы забыли свой пароль, вы можете восстановить его по следующей ссылке:"
 
 #: flask_security/templates/security/email/welcome_existing_username.html:13
 #: flask_security/templates/security/email/welcome_existing_username.txt:13
 #, python-format
 msgid ""
-"You attempted to register with a username \"%(username)s\" that is "
-"already associated with another account."
+"You attempted to register with a username \"%(username)s\" that is already "
+"associated with another account."
 msgstr ""
+"Вы попытались зарегистрироваться с именем пользователя «%(username)s», которое "
+"уже связано с другой учётной записью."
 
 #: flask_security/templates/security/email/welcome_existing_username.html:16
 #: flask_security/templates/security/email/welcome_existing_username.txt:16
 msgid "Please restart the registration process with a different username."
-msgstr ""
+msgstr "Пожалуйста, повторите процесс регистрации с другим именем пользователя."
 
 #~ msgid ""
-#~ "Open your authenticator app on your "
-#~ "device and scan the following qrcode "
-#~ "to start receiving codes:"
+#~ "Open your authenticator app on your device and scan the following qrcode to "
+#~ "start receiving codes:"
 #~ msgstr ""
-#~ "Откройте ваше приложение для авторизации "
-#~ "на вашем устройстве и просканируйте "
-#~ "данный QR код чтобы начать получать "
-#~ "коды:"
+#~ "Откройте ваше приложение для авторизации на вашем устройстве и просканируйте "
+#~ "данный QR код чтобы начать получать коды:"
 
 #~ msgid "Or use the the link below:"
 #~ msgstr "Или используйте данную ссылку:"
 
 #~ msgid ""
-#~ "In addition to your username and "
-#~ "password, you'll need to use a "
-#~ "code that we will send you"
+#~ "In addition to your username and password, you'll need to use a code that we "
+#~ "will send you"
 #~ msgstr ""
-#~ "Помимо вашего имени пользователя и "
-#~ "пароля, вам нужно будет использовать "
-#~ "код, который мы вам отправим"
+#~ "Помимо вашего имени пользователя и пароля, вам нужно будет использовать код, "
+#~ "который мы вам отправим"
 
 #~ msgid "Please enter your authentication code"
 #~ msgstr "Пожалуйста, введите ваш код аутентификации"
@@ -1064,21 +1061,15 @@
 #~ msgstr "Ваш токен был подтвержден"
 
 #~ msgid ""
-#~ "Open an authenticator app on your "
-#~ "device and scan the following QRcode "
-#~ "(or enter the code below manually) "
-#~ "to start receiving passcodes:"
+#~ "Open an authenticator app on your device and scan the following QRcode (or "
+#~ "enter the code below manually) to start receiving passcodes:"
 #~ msgstr ""
-#~ "Откройте приложение для аутентификации на "
-#~ "своем устройстве и отсканируйте следующий "
-#~ "QR-код (или введите код ниже вручную),"
-#~ " чтобы начать получать пароли:"
+#~ "Откройте приложение для аутентификации на своем устройстве и отсканируйте "
+#~ "следующий QR-код (или введите код ниже вручную), чтобы начать получать пароли:"
 
 #~ msgid ""
-#~ "Nickname: \"%s\" Usage: \"%s\" Transports: "
-#~ "\"%s\" Discoverable: \"%s\" Last used "
-#~ "on: %s"
+#~ "Nickname: \"%s\" Usage: \"%s\" Transports: \"%s\" Discoverable: \"%s\" Last "
+#~ "used on: %s"
 #~ msgstr ""
-#~ "Псевдоним: \"%s\" Использование: \"%s\" "
-#~ "Транспорты: \"%s\" Возможность обнаружения: "
-#~ "\"%s\" Последнее использование: %s"
+#~ "Псевдоним: \"%s\" Использование: \"%s\" Транспорты: \"%s\" Возможность "
+#~ "обнаружения: \"%s\" Последнее использование: %s"
diff -Nru flask-security-5.1.0/flask_security/unified_signin.py flask-security-5.1.1/flask_security/unified_signin.py
--- flask-security-5.1.0/flask_security/unified_signin.py	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/unified_signin.py	2023-03-01 20:12:52.000000000 +0100
@@ -716,7 +716,9 @@
         do_flash(m, c)
         return redirect(url_for_security("us_signin"))
 
-    tf_setup_methods = _security.two_factor_plugins.get_setup_tf_methods(user)
+    tf_setup_methods = []
+    if cv("TWO_FACTOR"):
+        tf_setup_methods = _security.two_factor_plugins.get_setup_tf_methods(user)
     if (
         cv("TWO_FACTOR")
         and "email" in cv("US_MFA_REQUIRED")
diff -Nru flask-security-5.1.0/flask_security/utils.py flask-security-5.1.1/flask_security/utils.py
--- flask-security-5.1.0/flask_security/utils.py	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/utils.py	2023-03-01 20:12:52.000000000 +0100
@@ -731,6 +731,7 @@
     warnings.warn(
         "'get_token_status' is deprecated - use check_and_get_token_status instead",
         DeprecationWarning,
+        stacklevel=2,
     )
     serializer = getattr(_security, serializer + "_serializer")
     max_age = get_max_age(max_age)
diff -Nru flask-security-5.1.0/flask_security/webauthn.py flask-security-5.1.1/flask_security/webauthn.py
--- flask-security-5.1.0/flask_security/webauthn.py	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/flask_security/webauthn.py	2023-03-01 20:12:52.000000000 +0100
@@ -511,7 +511,6 @@
     form.usage = state["usage"]
     form.user_verification = state["user_verification"]
     if form.validate_on_submit():
-
         # store away successful registration
         after_this_request(view_commit)
         _datastore.create_webauthn(
diff -Nru flask-security-5.1.0/.github/workflows/release.yml flask-security-5.1.1/.github/workflows/release.yml
--- flask-security-5.1.0/.github/workflows/release.yml	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/.github/workflows/release.yml	2023-03-01 20:12:52.000000000 +0100
@@ -9,10 +9,10 @@
   sdist:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v2
-      - uses: actions/setup-python@v2
+      - uses: actions/checkout@v3
+      - uses: actions/setup-python@v4
         with:
-          python-version: "3.8"
+          python-version: "3.9"
       - name: update pip
         run: |
           pip install -U wheel setuptools twine
@@ -22,7 +22,7 @@
           pip install tox
           tox -e makedist
       - name: Publish
-        uses: pypa/gh-action-pypi-publish@v1.4.1
+        uses: pypa/gh-action-pypi-publish@release/v1
         with:
           user: __token__
           password: ${{secrets.PYPI_API_TOKEN}}
diff -Nru flask-security-5.1.0/.github/workflows/tests.yml flask-security-5.1.1/.github/workflows/tests.yml
--- flask-security-5.1.0/.github/workflows/tests.yml	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/.github/workflows/tests.yml	2023-03-01 20:12:52.000000000 +0100
@@ -35,21 +35,18 @@
           - {python: 'pypy-3.9', tox: 'pypy39-low'}
 
     steps:
-      - uses: actions/checkout@v2
-      - uses: actions/setup-python@v2
+      - uses: actions/checkout@v3
+      - uses: actions/setup-python@v4
         with:
           python-version: ${{ matrix.python }}
       - name: update pip
         run: |
           pip install -U wheel setuptools
           python -m pip install -U pip
-      - name: get pip cache dir
-        id: pip-cache
-        run: echo "::set-output name=dir::$(pip cache dir)"
       - name: cache pip
-        uses: actions/cache@v2
+        uses: actions/cache@v3
         with:
-          path: ${{ steps.pip-cache.outputs.dir }}
+          path: ~/.cache/pip
           key: pip-${{ runner.os }}-${{ matrix.tox }}-${{ hashFiles('setup.py') }}-${{ hashFiles('tox.ini') }}-${{ hashFiles('requirements/*.txt') }}-${{ hashFiles('requirements_low/*.txt') }}
       - name: run tests
         run: |
@@ -59,23 +56,27 @@
   other:
       runs-on: ubuntu-latest
       steps:
-        - uses: actions/checkout@v2
-        - uses: actions/setup-python@v2
+        - uses: actions/checkout@v3
+        - uses: actions/setup-python@v4
           with:
             python-version: "3.9"
         - name: update pip
           run: |
             pip install -U wheel setuptools
             python -m pip install -U pip
-        - name: Style, docs, mypy, nobabel, nowebauthn, noauthlib
+        - name: Style, docs, mypy
           run: |
             pip install tox
-            tox -e style -e docs -e nobabel -e mypy -e nowebauthn -e noauthlib
+            tox -e style,docs,mypy
+        - name: nobabel, nowebauthn, noauthlib
+          run: |
+            pip install tox
+            tox -e nobabel,nowebauthn,noauthlib
   cov:
       runs-on: ubuntu-latest
       steps:
-        - uses: actions/checkout@v2
-        - uses: actions/setup-python@v2
+        - uses: actions/checkout@v3
+        - uses: actions/setup-python@v4
           with:
             python-version: "3.9"
         - name: update pip
@@ -87,7 +88,7 @@
             pip install tox coverage
             tox -e coverage
         - name: Upload coverage to Codecov
-          uses: codecov/codecov-action@v2
+          uses: codecov/codecov-action@v3
           with:
             fail_ci_if_error: false
             verbose: true
@@ -109,21 +110,18 @@
             --health-timeout 5s
             --health-retries 5
       steps:
-        - uses: actions/checkout@v2
-        - uses: actions/setup-python@v2
+        - uses: actions/checkout@v3
+        - uses: actions/setup-python@v4
           with:
             python-version: "3.9"
         - name: update pip
           run: |
             pip install -U wheel setuptools
             python -m pip install -U pip
-        - name: get pip cache dir
-          id: pip-cache
-          run: echo "::set-output name=dir::$(pip cache dir)"
         - name: cache pip
-          uses: actions/cache@v2
+          uses: actions/cache@v3
           with:
-            path: ${{ steps.pip-cache.outputs.dir }}
+            path: ~/.cache/pip
             key: pip-${{ runner.os }}-${{ hashFiles('setup.py') }}-${{ hashFiles('tox.ini') }}-${{ hashFiles('requirements/*.txt') }}
         - name: Postgres
           run: |
diff -Nru flask-security-5.1.0/.pre-commit-config.yaml flask-security-5.1.1/.pre-commit-config.yaml
--- flask-security-5.1.0/.pre-commit-config.yaml	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/.pre-commit-config.yaml	2023-03-01 20:12:52.000000000 +0100
@@ -19,7 +19,7 @@
     -   id: pyupgrade
         args: [--py37-plus]
 -   repo: https://github.com/psf/black
-    rev: 22.12.0
+    rev: 23.1.0
     hooks:
     -   id: black
 -   repo: https://github.com/pycqa/flake8
@@ -29,3 +29,9 @@
         additional_dependencies:
           - flake8-bugbear
           - flake8-implicit-str-concat
+-   repo: https://github.com/Riverside-Healthcare/djLint
+    rev: v1.19.16
+    hooks:
+      - id: djlint-jinja
+        files: "\\.html"
+        types_or: ['html']
diff -Nru flask-security-5.1.0/requirements/tests.txt flask-security-5.1.1/requirements/tests.txt
--- flask-security-5.1.0/requirements/tests.txt	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/requirements/tests.txt	2023-03-01 20:12:52.000000000 +0100
@@ -13,6 +13,7 @@
 check-manifest
 coverage
 cryptography
+djlint
 python-dateutil
 mongoengine
 mongomock
diff -Nru flask-security-5.1.0/setup.py flask-security-5.1.1/setup.py
--- flask-security-5.1.0/setup.py	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/setup.py	2023-03-01 20:12:52.000000000 +0100
@@ -19,6 +19,7 @@
     "passlib>=1.7.4",
     "blinker>=1.4",
     "wtforms>=3.0.0",  # for form-level errors
+    "setuptools",  # for pkg_resources
 ]
 
 packages = find_packages(exclude=["tests"])
diff -Nru flask-security-5.1.0/tests/conftest.py flask-security-5.1.1/tests/conftest.py
--- flask-security-5.1.0/tests/conftest.py	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/tests/conftest.py	2023-03-01 20:12:52.000000000 +0100
@@ -752,7 +752,6 @@
 
 
 def pony_setup(request, app, tmpdir, realdburl):
-
     pytest.importorskip("pony")
     from pony.orm import Database, Optional, Required, Set
     from pony.orm.core import SetInstance
diff -Nru flask-security-5.1.0/tests/templates/_messages.html flask-security-5.1.1/tests/templates/_messages.html
--- flask-security-5.1.0/tests/templates/_messages.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/tests/templates/_messages.html	2023-03-01 20:12:52.000000000 +0100
@@ -1,6 +1,6 @@
 {%- with messages = get_flashed_messages(with_categories=true) -%}
   {% if messages %}
-    <ul class=flashes>
+    <ul class="flashes">
     {% for category, message in messages %}
       <li class="{{ category }}">{{ message }}</li>
     {% endfor %}
diff -Nru flask-security-5.1.0/tests/templates/register.html flask-security-5.1.1/tests/templates/register.html
--- flask-security-5.1.0/tests/templates/register.html	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/tests/templates/register.html	2023-03-01 20:12:52.000000000 +0100
@@ -1,7 +1,7 @@
 {% include "_messages.html" %}
 {% include "_nav.html" %}
 <h1>Register</h1>
-<form action="{{ url_for_security('register') }}" method="POST" name="register_form">
+<form action="{{ url_for_security('register') }}" method="post" name="register_form">
   {{ register_user_form.hidden_tag() }}
   {{ register_user_form.email.label }} {{ register_user_form.email }}<br/>
   {{ register_user_form.password.label }} {{ register_user_form.password }}<br/>
diff -Nru flask-security-5.1.0/tests/test_common.py flask-security-5.1.1/tests/test_common.py
--- flask-security-5.1.0/tests/test_common.py	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/tests/test_common.py	2023-03-01 20:12:52.000000000 +0100
@@ -1046,7 +1046,6 @@
     client_nc = app.test_client(use_cookies=False)
 
     with app.test_request_context("/"):
-
         user = app.security.datastore.find_user(email="matt@lp.com")
         token = get_auth_token_version_3x(app, user)
 
diff -Nru flask-security-5.1.0/tests/test_csrf.py flask-security-5.1.1/tests/test_csrf.py
--- flask-security-5.1.0/tests/test_csrf.py	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/tests/test_csrf.py	2023-03-01 20:12:52.000000000 +0100
@@ -46,7 +46,6 @@
 
     @staticmethod
     def mp_validate_csrf(data, secret_key=None, time_limit=None, token_key=None):
-
         try:
             REAL_VALIDATE_CSRF(data, secret_key, time_limit, token_key)
             MpValidateCsrf.success += 1
@@ -302,7 +301,6 @@
 
     # This shouldn't log in - and will return 400
     with mp_validate_csrf() as mp:
-
         data = dict(email="matt@lp.com", password="password", remember="y")
         response = client_nc.post(
             "/login",
diff -Nru flask-security-5.1.0/tests/test_misc.py flask-security-5.1.1/tests/test_misc.py
--- flask-security-5.1.0/tests/test_misc.py	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/tests/test_misc.py	2023-03-01 20:12:52.000000000 +0100
@@ -5,7 +5,7 @@
     Lots of tests
 
     :copyright: (c) 2012 by Matt Wright.
-    :copyright: (c) 2019-2022 by J. Christopher Wagner (jwag).
+    :copyright: (c) 2019-2023 by J. Christopher Wagner (jwag).
     :license: MIT, see LICENSE for more details.
 """
 
@@ -797,7 +797,6 @@
 @pytest.mark.skipif(sys.version_info < (3, 0), reason="requires python3 or higher")
 @pytest.mark.settings(password_check_breached="strict")
 def test_breached(app, sqlalchemy_datastore):
-
     # partial response from: https://api.pwnedpasswords.com/range/07003
     pwned_response = b"AF5A73CD3CBCFDCD12B0B68CB7930F3E888:2\r\n\
 AFD8AA47E6FD782ADDC11D89744769F7354:2\r\n\
@@ -826,7 +825,6 @@
     password_complexity_checker="zxcvbn",
 )
 def test_breached_cnt(app, sqlalchemy_datastore):
-
     # partial response from: https://api.pwnedpasswords.com/range/07003
     pwned_response = b"AF5A73CD3CBCFDCD12B0B68CB7930F3E888:2\r\n\
 AFD8AA47E6FD782ADDC11D89744769F7354:2\r\n\
@@ -1387,3 +1385,32 @@
 
         static_url = url_for(".static", filename="js/webauthn.js")
         assert static_url == "/mystatic/fs/js/webauthn.js"
+
+
+def test_multi_app(app, sqlalchemy_datastore):
+    # test that 2 different app with 2 different FS
+    # with USERNAME_ENABLE which dynamically changes the class definition
+    app = Flask(__name__)
+    app.response_class = Response
+    app.debug = True
+    app.config["SECRET_KEY"] = "secret"
+    app.config["TESTING"] = True
+    app.config["SECURITY_USERNAME_ENABLE"] = True
+
+    security = Security(datastore=sqlalchemy_datastore)
+    security.init_app(app)
+    assert hasattr(security.forms["register_form"].cls, "username")
+    assert "username" in security.user_identity_attributes[1].keys()
+
+    app = Flask(__name__)
+    app.response_class = Response
+    app.debug = True
+    app.config["SECRET_KEY"] = "secret"
+    app.config["TESTING"] = True
+    app.config["SECURITY_USERNAME_ENABLE"] = True
+
+    security2 = Security(datastore=sqlalchemy_datastore)
+    security2.init_app(app)
+
+    assert hasattr(security2.forms["register_form"].cls, "username")
+    assert "username" in security2.user_identity_attributes[1].keys()
diff -Nru flask-security-5.1.0/tests/test_recoverable.py flask-security-5.1.1/tests/test_recoverable.py
--- flask-security-5.1.0/tests/test_recoverable.py	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/tests/test_recoverable.py	2023-03-01 20:12:52.000000000 +0100
@@ -605,7 +605,6 @@
 
 @pytest.mark.settings(return_generic_responses=True)
 def test_generic_response(app, client, get_message):
-
     # try unknown user
     response = client.post("/reset", data=dict(email="whoami@test.com"))
     assert (
diff -Nru flask-security-5.1.0/tests/test_recovery_codes.py flask-security-5.1.1/tests/test_recovery_codes.py
--- flask-security-5.1.0/tests/test_recovery_codes.py	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/tests/test_recovery_codes.py	2023-03-01 20:12:52.000000000 +0100
@@ -155,7 +155,6 @@
 
 @pytest.mark.settings(multi_factor_recovery_codes=True, url_prefix="/api")
 def test_rc_bad_state(app, client, get_message):
-
     response = client.post("/api/mf-recovery", json=dict(code="hi"))
     assert response.status_code == 400
     assert response.json["response"]["errors"][0].encode("utf=8") == get_message(
diff -Nru flask-security-5.1.0/tests/test_registerable.py flask-security-5.1.1/tests/test_registerable.py
--- flask-security-5.1.0/tests/test_registerable.py	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/tests/test_registerable.py	2023-03-01 20:12:52.000000000 +0100
@@ -37,7 +37,6 @@
     # Test registering is successful, sends email, and fires signal
     @user_registered.connect_via(app)
     def on_user_registered(app, **kwargs):
-
         assert isinstance(app, Flask)
         assert isinstance(kwargs["user"], UserMixin)
         assert kwargs["confirm_token"] is None
@@ -302,7 +301,6 @@
 
     @user_registered.connect_via(app)
     def on_user_registered(app, **kwargs):
-
         assert isinstance(app, Flask)
         assert isinstance(kwargs["user"], UserMixin)
         assert kwargs["confirm_token"] is None
diff -Nru flask-security-5.1.0/tests/test_two_factor.py flask-security-5.1.1/tests/test_two_factor.py
--- flask-security-5.1.0/tests/test_two_factor.py	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/tests/test_two_factor.py	2023-03-01 20:12:52.000000000 +0100
@@ -264,7 +264,6 @@
 
 @pytest.mark.settings(two_factor_required=True)
 def test_two_factor_two_factor_setup_anonymous(app, client, get_message):
-
     # trying to pick method without doing earlier stage
     data = dict(setup="email")
 
@@ -279,7 +278,6 @@
 
 @pytest.mark.settings(two_factor_required=True, url_prefix="/api")
 def test_two_factor_illegal_state(app, client, get_message):
-
     # trying to pick method without doing earlier stage
     data = dict(setup="email")
 
diff -Nru flask-security-5.1.0/tests/test_unified_signin.py flask-security-5.1.1/tests/test_unified_signin.py
--- flask-security-5.1.0/tests/test_unified_signin.py	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/tests/test_unified_signin.py	2023-03-01 20:12:52.000000000 +0100
@@ -249,7 +249,6 @@
     headers = {"Accept": "application/json", "Content-Type": "application/json"}
 
     with capture_flashes() as flashes:
-
         response = client_nc.get("/us-signin", headers=headers)
         jresponse = response.json["response"]
         assert (
@@ -2012,7 +2011,6 @@
 
 @pytest.mark.settings(return_generic_responses=True)
 def test_generic_response(app, client, get_message):
-
     # test not-setup choice
     data = dict(identity="matt@lp.com", chosen_method="email")
     response = client.post("/us-signin/send-code", data=data, follow_redirects=True)
diff -Nru flask-security-5.1.0/tests/test_webauthn.py flask-security-5.1.1/tests/test_webauthn.py
--- flask-security-5.1.0/tests/test_webauthn.py	2023-01-24 01:57:25.000000000 +0100
+++ flask-security-5.1.1/tests/test_webauthn.py	2023-03-01 20:12:52.000000000 +0100
@@ -937,7 +937,6 @@
     webauthn_util_cls=HackWebauthnUtil, wan_register_within="1 seconds"
 )
 def test_register_timeout(app, client, get_message):
-
     authenticate(client)
 
     app.security.wan_serializer = FakeSerializer(1.0)
@@ -952,7 +951,6 @@
 
 @pytest.mark.settings(webauthn_util_cls=HackWebauthnUtil, wan_signin_within="2 seconds")
 def test_signin_timeout(app, client, get_message):
-
     authenticate(client)
 
     register_options, response_url = _register_start_json(client, name="testr3")

Reply to: