diff --git a/web/packages/teleport/src/Account/Account.tsx b/web/packages/teleport/src/Account/Account.tsx index 2dbe2a2e8e2b6..27932b0260449 100644 --- a/web/packages/teleport/src/Account/Account.tsx +++ b/web/packages/teleport/src/Account/Account.tsx @@ -61,9 +61,13 @@ export interface EnterpriseComponentProps { export interface AccountPageProps { enterpriseComponent?: React.ComponentType; + userTrustedDevicesComponent?: React.ComponentType; } -export function AccountPage({ enterpriseComponent }: AccountPageProps) { +export function AccountPage({ + enterpriseComponent, + userTrustedDevicesComponent, +}: AccountPageProps) { const ctx = useTeleport(); const storeUser = useStore(ctx.storeUser); const isSso = storeUser.isSso(); @@ -84,6 +88,7 @@ export function AccountPage({ enterpriseComponent }: AccountPageProps) { passwordState={storeUser.getPasswordState()} {...manageDevicesState} enterpriseComponent={enterpriseComponent} + userTrustedDevicesComponent={userTrustedDevicesComponent} onPasswordChange={onPasswordChange} /> ); @@ -115,6 +120,7 @@ export function Account({ canAddPasskeys, enterpriseComponent: EnterpriseComponent, newDeviceUsage, + userTrustedDevicesComponent: TrustedDeviceListComponent, passwordState, onPasswordChange: onPasswordChangeCb, }: AccountProps) { @@ -193,7 +199,7 @@ export function Account({ return ( - + Account Settings @@ -266,6 +272,7 @@ export function Account({ {EnterpriseComponent && ( )} + {TrustedDeviceListComponent && } diff --git a/web/packages/teleport/src/DeviceTrust/types.ts b/web/packages/teleport/src/DeviceTrust/types.ts index 951a8dd77addc..9e4dc3f93b18a 100644 --- a/web/packages/teleport/src/DeviceTrust/types.ts +++ b/web/packages/teleport/src/DeviceTrust/types.ts @@ -23,7 +23,8 @@ export type TrustedDevice = { assetTag: string; osType: TrustedDeviceOSType; enrollStatus: 'enrolled' | 'not enrolled'; - owner?: string; + owner: string; + createTime?: Date; }; export type TrustedDeviceOSType = 'Windows' | 'Linux' | 'macOS';