Skip to content

Commit 4c872d1

Browse files
authored
fix: device attributes type (#14520)
1 parent 6ea70f9 commit 4c872d1

File tree

1 file changed

+5
-2
lines changed
  • packages/auth/src/providers/cognito/types

1 file changed

+5
-2
lines changed

packages/auth/src/providers/cognito/types/models.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
AWSAuthUser,
1111
AuthCodeDeliveryDetails,
1212
AuthDevice,
13-
AuthUserAttribute,
1413
} from '../../../types';
1514
import { AuthProvider } from '../../../types/inputs';
1615

@@ -89,11 +88,15 @@ export type AutoSignInEventData =
8988
| {
9089
event: 'autoSignIn';
9190
};
91+
92+
type DeviceAttributeKey = 'device_status' | 'device_name' | 'last_ip_used';
93+
9294
/**
9395
* Holds the device specific information along with it's id and name.
9496
*/
9597
export type AWSAuthDevice = AuthDevice & {
96-
attributes: AuthUserAttribute<UserAttributeKey>;
98+
attributes: Partial<Record<DeviceAttributeKey, string>> &
99+
Record<string, string>;
97100
createDate?: Date;
98101
lastAuthenticatedDate?: Date;
99102
lastModifiedDate?: Date;

0 commit comments

Comments
 (0)