Skip to content

Commit 25985a8

Browse files
committed
fix(access-control): keep a saved SSO chat mode selectable when SSO env is off
Treat savedAuthType === 'sso' as SSO-enabled when building auth options so an existing SSO chat isn't dropped and silently downgraded by the snap effect. Mirrors the file-share modal.
1 parent 691a496 commit 25985a8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/chat

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/chat/chat.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,10 @@ function AuthSelector({
678678

679679
const { config: permissionConfig } = usePermissionConfig()
680680

681-
const ssoEnabled = isTruthy(getEnv('NEXT_PUBLIC_SSO_ENABLED'))
681+
// SSO shows when the env flag is on, or when this chat is already saved as SSO,
682+
// so an existing SSO mode is never dropped (and silently downgraded by the snap
683+
// effect below) when the flag is off.
684+
const ssoEnabled = isTruthy(getEnv('NEXT_PUBLIC_SSO_ENABLED')) || savedAuthType === 'sso'
682685
const baseAuthOptions: AuthType[] = ssoEnabled
683686
? ['public', 'password', 'email', 'sso']
684687
: ['public', 'password', 'email']

0 commit comments

Comments
 (0)