aws-amplify / aws-amplify/amplify-android
Add a method to retrieve the device key for the currently logged-in device
- Dominant language
- Java
- Stars
- 287
- Forks
- 132
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 45
Description
### 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.
Contributor guide
Research direction
Start by reviewing Amplify Auth's public API, especially Auth.fetchDevices() and the Hub sign-in event payload, to understand how device information is currently exposed. Done means a public Auth property or method can retrieve the device key for the currently active session, including an untrusted but tracked device.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- authentication, mobile
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100