mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 11:12:35 +02:00
The row is updated in place, never delete-recreated: user_oidc_links references it with ON DELETE CASCADE, so recreating the provider would silently unlink every account bound to it. For the same reason, removing the variables disables the provider rather than deleting it -- the links would not come back when the config does. Config goes through OIDCProviderCreate, the schema the API already uses, so the environment cannot reach a state the UI would have refused. That covers the SEC-1 auto-link check: auto-link plus unverified email is an account takeover, and it is rejected here exactly as it is in the UI. Nothing raises. This runs during startup, so a typo in one variable must not stop the app from booting -- a rejected config is logged and skipped, leaving the previous provider untouched. Refs #2593