Skip to content

In a CUSTOM_AUTH flow, how do I detect the user's current device key in a Lambda?

0

I would like to compare the user's current device key with the one marked as remembered on the user in Cognito, so I could skip emailing them a confirmation code for remembered devices. It's not in the event, or the context.

1 Answer
0

Hi,

Just do a DEVICE_SRP_AUTH challenge and Cognito will perform the check for you. If this steps is successful the session step result will be true and you can decide to skip the next challenge and issue tokens directly. If it is not true then you can do the next challenge.

Jeff

AWS
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.