Overriding Flask-User/Flask-Login's default templates

I implemented @JBLaf's suggestion, but this did not resolve the problem. I realised that the default sign in page I was being presented was not actually flask-login's login.html template, but its login_auth0.html template. This was a template that I hadn't replaced in my own flask_user folder, as I didn't think it necessary.

Two ways to resolve this:

  1. Set USER_ENABLE_AUTH0 = False. This makes it use the login.html template, which is my own custom one. However, this caused problems for me down the line because I do allow SSO sign-ins. So the better solution was:
  2. Create a login-auth0.html file in my templates/flask_user folder, containing only the line {% include 'flask_user/login.html' %}.

Now Flask-User will try to redirect to the auth0 template, which will instead render my login.html template.