refactor(auth/sso): rename GetAuthorizationUrl for clarity (#10173)
- Rename `GetAuthorizationUrl` to `GetAuthorizationUrlForSSO` - Move `GetAuthorizationUrlForSSO` from `sso.resolver.ts` to `auth.resolver.ts` to avoid the permission guard and let users use an SSO provider. - Fix an issue in OIDC guard that breaks the connection if you have multiple SSO providers + add tests for OIDC guard.
This commit is contained in:
@ -8,6 +8,7 @@ import { HorizontalSeparator, MainButton } from 'twenty-ui';
|
||||
|
||||
import { workspaceAuthProvidersState } from '@/workspace/states/workspaceAuthProvidersState';
|
||||
import { isDefined } from 'twenty-shared';
|
||||
import React from 'react';
|
||||
|
||||
const StyledContentContainer = styled.div`
|
||||
margin-bottom: ${({ theme }) => theme.spacing(8)};
|
||||
@ -24,16 +25,15 @@ export const SignInUpSSOIdentityProviderSelection = () => {
|
||||
<StyledContentContainer>
|
||||
{isDefined(workspaceAuthProviders?.sso) &&
|
||||
workspaceAuthProviders?.sso.map((idp) => (
|
||||
<>
|
||||
<React.Fragment key={idp.id}>
|
||||
<MainButton
|
||||
key={idp.id}
|
||||
title={idp.name}
|
||||
onClick={() => redirectToSSOLoginPage(idp.id)}
|
||||
Icon={guessSSOIdentityProviderIconByUrl(idp.issuer)}
|
||||
fullWidth
|
||||
/>
|
||||
<HorizontalSeparator visible={false} />
|
||||
</>
|
||||
</React.Fragment>
|
||||
))}
|
||||
</StyledContentContainer>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user