I used CognitoIdentityServiceProvider.adminListUserAuthEvents for getting user auth events but received an invalid result. I logged in from Opera but Cognito displays that I used Chrome 8 (this is a mistake).
I could fix that if I get original navigator.userAgent
(for example: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36 OPR/72.0.3815.400
), but I only received data like that:
{
"EventId": ${EVENT_ID},
"EventType": "SignIn",
"CreationDate": ${CREATION_DATE},
"EventResponse": "Pass",
"EventRisk": {
"RiskDecision": "AccountTakeover",
"RiskLevel": "Low",
"CompromisedCredentialsDetected": false
},
"ChallengeResponses": [
{
"ChallengeName": "Password",
"ChallengeResponse": "Success"
}
],
"EventContextData": {
"IpAddress": ${MY_IP_ADDR},
"DeviceName": "Chrome 8, Linux",
"City": ${MY_CITY},
"Country": ${MY_COUNTRY}
}
}
I wouldn't like to make the crutch, to clarify this information, like creating preauth
Cognito trigger which will log this information in another Table and handle this flow by myself
UPD: crutch for detection browser I found here
UPD 2: The opened issue on the official AWS Github repo
That's a bug and AWS promises to fix it. More information here.