Release v2.2: admin auth settings, Passkey RP ID, Cloudflare and Google captcha

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-07 02:57:49 +03:00
parent 0a51001791
commit 0584ebdc74
18 changed files with 458 additions and 4 deletions
+26
View File
@@ -90,6 +90,32 @@ def create_app(setup_database=True):
except Exception:
return {"site_banners": {}}
@app.context_processor
def inject_auth_settings():
from app.settings_service import get_auth_public_settings
try:
return {"auth_settings": get_auth_public_settings()}
except Exception:
return {
"auth_settings": {
"registration_enabled": True,
"password_login_enabled": True,
"passkey_enabled": True,
}
}
@app.context_processor
def inject_captcha():
from flask import request
from app.captcha_service import get_captcha_config_for_request
try:
return {"captcha_config": get_captcha_config_for_request(request.endpoint)}
except Exception:
return {"captcha_config": None}
if setup_database:
with app.app_context():
from app.bootstrap import (