The connector Saved Object already supports authMode. We should leverage that field by inferring the mode from auth type metadata, rather than hardcoding auth type ids in application logic.
Goal
- Add an auth‑type configuration flag (e.g.
authMode: 'per-user' | 'shared' or isPerUser: boolean) to the auth type spec.
- Use this metadata to infer and persist connector
authMode on create/update.
- Do not hardcode
oauth_authorization_code checks in application code; the auth type spec should be the source of truth.
- Today, only OAuth Authorization Code should be marked per‑user; all other auth types default to shared.
Constraint
- Prevent auth type changes on update for connectors already using a per‑user auth type (reject or ignore the change) to avoid a one‑way door before the best UX is confirmed. (doesn't need to be done in this PR, but taken into account if needed)
Outcome
auth_mode is stored for connectors based on auth type metadata.
- The list/get APIs return
auth_mode consistently for all connectors.
The connector Saved Object already supports
authMode. We should leverage that field by inferring the mode from auth type metadata, rather than hardcoding auth type ids in application logic.Goal
authMode: 'per-user' | 'shared'orisPerUser: boolean) to the auth type spec.authModeon create/update.oauth_authorization_codechecks in application code; the auth type spec should be the source of truth.Constraint
Outcome
auth_modeis stored for connectors based on auth type metadata.auth_modeconsistently for all connectors.