SSO role assignment modal now only appears when the setting actually changes
The confirmation dialog in SAML and OIDC settings was interrupting users every time they saved, even when the role assignment dropdown stayed the same. A new reactive approach fixes the false positives.
Users configuring SAML or OIDC single sign-on in n8n were being interrupted by a confirmation modal every time they saved their settings, regardless of whether they had actually changed the role assignment dropdown. This was not only annoying but counterintuitive—the modal was designed to warn users before making consequential changes, yet it appeared in situations where nothing was changing at all.
The problem stemmed from a function that mixed concerns: it was checking whether the SSO login toggle had changed, when the real question should simply be whether the role assignment dropdown value differed from what was already saved. The fix replaces this logic with a reactive computed property called that purely compares the current dropdown state against the persisted configuration, returning one of three values: 'none', 'backup', or 'switchToManual'. Only when the value is something other than 'none' does the modal appear.
The changes also introduce cancel-revert behavior. When users click Cancel in the confirmation dialog, the dropdown now reverts to its previously saved value rather than staying in its modified state. Additionally, modal copy was refreshed to be clearer about what is changing and why.
The fix applies to both SAML and OIDC settings forms in the editor frontend, along with the confirmation dialog component and supporting composable.
View Original GitHub Description
Summary
The role assignment confirmation modal in SSO settings (SAML/OIDC) was appearing on every save, even when the Role Assignment dropdown hadn't changed. This was caused by shouldPromptUserToConfirmUserRoleProvisioningChange() mixing SSO login toggle state with provisioning modal concerns.
Replaces the old function with a reactive roleAssignmentTransition computed that purely compares the current dropdown value against the persisted config, returning 'none', 'backup', or 'switchToManual'. Also updates modal copy per spec and adds cancel-revert behavior.
How to verify
- Go to Settings → SSO (SAML or OIDC)
- With SSO already enabled and a role assignment method already selected, click Save without changing the Role Assignment dropdown → No modal should appear, form saves directly with a success toast
- Change Role Assignment from "Assigned manually in n8n" to any SSO option (e.g. "Instance roles") → Click Save → "Change role assignment method" modal should appear with CSV download options
- Change Role Assignment between two SSO options (e.g. "Instance roles" → "Instance and project roles") → Click Save → Same backup modal should appear
- Change Role Assignment from any SSO option back to "Assigned manually in n8n" → Click Save → "Manage user role provisioning in n8n only" modal should appear (no CSV downloads, just checkbox confirmation)
- In any modal, click Cancel → The dropdown should revert to its previously saved value
Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/IAM-535
Review / Merge checklist
- I have seen this code, I have run this code, and I take responsibility for this code.
- PR title and summary are descriptive. (conventions)
- Docs updated or follow-up ticket created.
- Tests included.
- PR Labeled with
Backport to Beta,Backport to Stable, orBackport to v1(if the PR is an urgent fix that needs to be backported)