You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But when the call happens it returns devices with following keys: ['id', 'name', 'attributes', 'createDate', 'lastModifiedDate', 'lastAuthenticatedDate']
Expected behavior
The type declarations should contain attribute name which it's value is something like: macOS 15.1.1 arm macOS Not A(Brand/8.0.0.0;Chromium/132.0.6834.160;Google Chrome/132.0.6834.160 This is a user friendly name to show user which device this logged in device refers to.
As you can see here the name attribute is returned from parseDevicesResponse(it has return type of FetchDevicesOutput = AWSAuthDevice[];) but the type of AWSAuthDevice doesn't have that attribute. This makes the IDE and compiler confused.
I can also make a pull request(with some assistant).
Reproduction steps
call const devices = await fetchDevices()
map the devices like devices.map(device => device?.name)
Getting compiler issues
Code Snippet
// Put your code below this line.(awaitfetchDevices()).map(device=>device?.name)
Log output
// Put your logs below this line
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered:
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
Authentication
Amplify Version
v6
Amplify Categories
api
Backend
CDK
Environment information
Describe the bug
calling
fetchDevices
fromaws-amplify/auth
has return type of:FetchDevicesOutput
her is the related type declarations:But when the call happens it returns devices with following keys:
['id', 'name', 'attributes', 'createDate', 'lastModifiedDate', 'lastAuthenticatedDate']
Expected behavior
The type declarations should contain attribute name which it's value is something like:
macOS 15.1.1 arm macOS Not A(Brand/8.0.0.0;Chromium/132.0.6834.160;Google Chrome/132.0.6834.160
This is a user friendly name to show user which device this logged in device refers to.As you can see here the name attribute is returned from
parseDevicesResponse
(it has return type ofFetchDevicesOutput = AWSAuthDevice[];
) but the type of AWSAuthDevice doesn't have that attribute. This makes the IDE and compiler confused.I can also make a pull request(with some assistant).
Reproduction steps
const devices = await fetchDevices()
devices.map(device => device?.name)
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: