내용으로 건너뛰기

How can I modify the response of a PreSignup Trigger?

1

Hello, I am currently using the Cognito PreSignUp trigger to validate and insert the user attributes both default and custom into the database. I need a way to return the the userId (which is generated by the database incrementally) in the response of the trigger so the frontend can have the userId for future api calls. I am open to any other suggestions of doing this?

  • I too would like to know this as I am struggling sending my users from Cognito into my User Table of DynamoDB, so I assume I will struggle with AppSync API and Users too. Thanks for asking this question!

질문됨 일 년 전290회 조회
1개 답변
0

You can add the userId as a custom attribute to the event.response.userAttributes object. This will ensure the userId is included in the response from the trigger.

AWS
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

관련 콘텐츠