Problem
Currently, there is no public API in Amplify Auth to retrieve the device key (device ID) for the currently logged-in user. While Auth.fetchDevices() retrieves trusted devices, it does not return the key for the current (active) device—especially if it's an untrusted but tracked device. Additionally, the Hub sign-in event does not expose this information in its payload.
Proposed Solution
Introduce a new property or method under Auth—such as Auth.currentDeviceKey or Auth.getCurrentDeviceId()—to return the device key for the currently active session. This would allow developers to access the device key directly without relying on internal workarounds.