amazon-archives / amazon-cognito-identity-js

Amazon Cognito Identity SDK for JavaScript
Other
984 stars 454 forks source link

Getting username from IdentityId in lambda with Developer Authenticated identities #643

Closed okarlsson closed 6 years ago

okarlsson commented 6 years ago

Hi!

I'm retrieving a identity id from a developer authentication in my lambda function. Now I want to get the username that the user logged in with when they request a different function with the token that they recieved. I can see a value "Developer identifiers" in the console, is there a way to access that value from the sdk?

image

PedrooBritoo commented 6 years ago

I have the same problem.

okarlsson commented 6 years ago

Hey @PedrooBritoo!

I was able to solve this. Have a look at this function in the sdk:

https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CognitoIdentity.html#lookupDeveloperIdentity-property

PedrooBritoo commented 6 years ago

Hey @okarlsson!

Thanks for sharing.