fix: use app password auth for background sync in Login Flow mode
Login Flow v2 is a deployment-wide mode where all users authenticate with app passwords (not OAuth refresh tokens). Set use_basic_auth=True when enable_login_flow is true so the background sync user manager queries the app_passwords table and scanners use app password authentication for Nextcloud API calls. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
474cfe5e98
commit
c21776948d
@@ -1807,9 +1807,9 @@ def get_app(transport: str = "streamable-http", enabled_apps: list[str] | None =
|
||||
break
|
||||
|
||||
# Determine authentication mode for background sync
|
||||
# Multi-user BasicAuth: use app passwords via Astrolabe (NOT OAuth)
|
||||
# OAuth mode: use OAuth refresh tokens (NOT app passwords)
|
||||
use_basic_auth = not oauth_enabled
|
||||
# Login Flow v2 and multi-user BasicAuth: use app passwords
|
||||
# OAuth mode (without Login Flow): use OAuth refresh tokens
|
||||
use_basic_auth = not oauth_enabled or settings.enable_login_flow
|
||||
|
||||
# Start background tasks using anyio TaskGroup
|
||||
async with anyio.create_task_group() as tg:
|
||||
|
||||
Reference in New Issue
Block a user