amazon-archives / aws-cognito-angular-quickstart

An Angular(v5)-based QuickStart single-page app utilizing Amazon Cognito, S3, and DynamoDB (Serverless architecture)
https://cognito.budilov.com
Apache License 2.0
689 stars 302 forks source link

How to retrieve event.response? #60

Closed robertbrower-technologies closed 7 years ago

robertbrower-technologies commented 7 years ago

I have a onPostAuthentication lambda function set up and being called on my user pool's post authentication trigger. In this function I set event.response.accessToken = accessToken;

How can I retrieve this token in my Angular 2 single page app when a user logs in?

Thank you!

Robert

vbudilov commented 7 years ago

Take a look at the CognitoUtil.getAccessToken function.

robertbrower-technologies commented 7 years ago

My question was more related to how to pass things back in event.response of a lambda to the caller via the callback method and retrieve them in the webapp via the api.