diff --git a/web/packages/teleport/src/Account/Account.tsx b/web/packages/teleport/src/Account/Account.tsx index aa08b1fe9fde4..ca86669ac0f1c 100644 --- a/web/packages/teleport/src/Account/Account.tsx +++ b/web/packages/teleport/src/Account/Account.tsx @@ -62,9 +62,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(); @@ -85,6 +89,7 @@ export function AccountPage({ enterpriseComponent }: AccountPageProps) { passwordState={storeUser.getPasswordState()} {...manageDevicesState} enterpriseComponent={enterpriseComponent} + userTrustedDevicesComponent={userTrustedDevicesComponent} onPasswordChange={onPasswordChange} /> ); @@ -116,6 +121,7 @@ export function Account({ canAddPasskeys, enterpriseComponent: EnterpriseComponent, newDeviceUsage, + userTrustedDevicesComponent: TrustedDeviceListComponent, passwordState, onPasswordChange: onPasswordChangeCb, }: AccountProps) { @@ -191,7 +197,7 @@ export function Account({ return ( - + Account Settings @@ -264,6 +270,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 1428fd6ffb44c..da635694c9f1d 100644 --- a/web/packages/teleport/src/DeviceTrust/types.ts +++ b/web/packages/teleport/src/DeviceTrust/types.ts @@ -24,6 +24,7 @@ export type TrustedDevice = { osType: TrustedDeviceOSType; enrollStatus: 'enrolled' | 'not enrolled'; owner: string; + createTime?: Date; }; export type TrustedDeviceOSType = 'Windows' | 'Linux' | 'macOS';