1 Answer
- Newest
- Most votes
- Most comments
0
Hello,
The error you are receiving 'Invalid device key given' usually happens when USER_SRP_AUTH [1] is not being used. Please ensure you are making use of USER_SRP_AUTH . You may refer the below Article for understanding the complete flow of Device Tracking And Remembering.
[+] https://aws.amazon.com/premiumsupport/knowledge-center/cognito-user-pool-remembered-devices/
If you continue to face the issue, I would suggest raising a case with support to perform a dive deep. Please open a support case with AWS using the following link-
[+] https://console.aws.amazon.com/support/home#/case/create
Reference
Relevant content
- asked 2 years ago
- asked a month ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
Thanks for your reply - we yesterday discovered that this user flow wasn't using
USER_SRP_AUTH
and have since modified it. We have also found that the request to authenticate and the request to send the MFA code AND the request to confirm the users device all need to use the same cognito object to make the request, which is whyaws-cognito-identity-js
works fine in the browser. As our login & MFA verification calls are on different endpoints we have had to come up with a solution that allows these two calls to share the cognito object through a long-lived lambda function that is invoked by both these lambda's themselves.