File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed
packages/clerk-js/src/ui/components/UserVerification Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ import type { EnterpriseSSOFactor , SessionVerificationFirstFactor } from '@clerk/types' ;
2+
3+ import { Card , Card } from '@/ui/elements/Card' ;
4+ import { Header } from '@/ui/elements/Header' ;
5+
6+ import { localizationKeys } from '../../customizables' ;
7+
8+ type UVFactorOneEnterpriseSSOCardProps = {
9+ currentFactor : EnterpriseSSOFactor ;
10+ availableFactors : SessionVerificationFirstFactor [ ] | null ;
11+ } ;
12+
13+ export const UVFactorOneEnterpriseSSOCard = ( _props : UVFactorOneEnterpriseSSOCardProps ) => {
14+ return (
15+ < Card . Root >
16+ < Card . Content >
17+ < Header . Root showLogo >
18+ { /* TODO - Display headers depending on whether there's a single or multiple connections */ }
19+ < Header . Title localizationKey = { localizationKeys ( 'reverification.enterprise_sso.title' ) } />
20+ < Header . Subtitle localizationKey = { localizationKeys ( 'reverification.enterprise_sso.subtitle' ) } />
21+ </ Header . Root >
22+ < Card . Alert > { card . error } </ Card . Alert >
23+ { /* TODO -> Display option to choose enterprise SSO */ }
24+ </ Card . Content >
25+
26+ < Card . Footer />
27+ </ Card . Root >
28+ ) ;
29+ } ;
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import { UserVerificationFactorOnePasswordCard } from './UserVerificationFactorO
1515import { useUserVerificationSession , withUserVerificationSessionGuard } from './useUserVerificationSession' ;
1616import { sortByPrimaryFactor } from './utils' ;
1717import { UVFactorOneEmailCodeCard } from './UVFactorOneEmailCodeCard' ;
18+ import { UVFactorOneEnterpriseSSOCard } from './UVFactorOneEnterpriseSSOCard' ;
1819import { UVFactorOnePasskeysCard } from './UVFactorOnePasskeysCard' ;
1920import { UVFactorOnePhoneCodeCard } from './UVFactorOnePhoneCodeCard' ;
2021
@@ -156,6 +157,13 @@ export function UserVerificationFactorOneInternal(): JSX.Element | null {
156157 ) ;
157158 case 'passkey' :
158159 return < UVFactorOnePasskeysCard onShowAlternativeMethodsClicked = { toggleAllStrategies } /> ;
160+ case 'enterprise_sso' :
161+ return (
162+ < UVFactorOneEnterpriseSSOCard
163+ currentFactor = { currentFactor }
164+ availableFactors = { availableFactors }
165+ />
166+ ) ;
159167 default :
160168 return < LoadingCard /> ;
161169 }
You can’t perform that action at this time.
0 commit comments