feat(auth): enhance SSO handling and workspace auth logic (#9858)
- Return only SSO providers with an `activate` status - If only 1 SSO provider is enabled for auth, redirect the user to the provider login page. - if only SSO auth is available set the step to SSO selection. --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -2,13 +2,7 @@ import { createState } from '@ui/utilities/state/utils/createState';
|
||||
|
||||
import { AuthProviders } from '~/generated/graphql';
|
||||
|
||||
export const workspaceAuthProvidersState = createState<AuthProviders>({
|
||||
export const workspaceAuthProvidersState = createState<AuthProviders | null>({
|
||||
key: 'workspaceAuthProvidersState',
|
||||
defaultValue: {
|
||||
google: true,
|
||||
magicLink: false,
|
||||
password: true,
|
||||
microsoft: false,
|
||||
sso: [],
|
||||
},
|
||||
defaultValue: null,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user