refacto(auth): improve type + remove complexity (#9949)

- Improve type
- Remove unnecessary code
- Fix the issue that prevents the usage of invitations when a user signs
in with social media.
- Add Microsoft icon for sso list page
This commit is contained in:
Antoine Moreaux
2025-01-31 15:39:45 +01:00
committed by GitHub
parent 591301f7ce
commit b801307d92
11 changed files with 120 additions and 125 deletions

View File

@ -1,6 +1,11 @@
/* @license Enterprise */
import { IconComponent, IconGoogle, IconKey } from 'twenty-ui';
import {
IconComponent,
IconGoogle,
IconKey,
IconMicrosoftOutlook,
} from 'twenty-ui';
export const guessSSOIdentityProviderIconByUrl = (
url: string,
@ -9,5 +14,9 @@ export const guessSSOIdentityProviderIconByUrl = (
return IconGoogle;
}
if (url.includes('microsoft')) {
return IconMicrosoftOutlook;
}
return IconKey;
};