what is the nice way to list cognito users using s...
# help
a
what is the nice way to list cognito users using sst?
f
Hey @Artem Kalantai u mean listing all users during the build process? can you share a bit more context on what you are trying to do?
a
yea, I want to get full users sub ids from cognito so I can make relation between users and one some dynamo table, but i realize that I probably need to make dynamo table for users, so next question how to handle post cconfirmation lambda in sst?
@Frank I'm really need help here, pleeeasse
f
Sorry @Artem Kalantai I ran into some issue last night cutting a release 🤪
Is the user pool created in the SST app or is it imported into SST?
a
imported
but I can create new one if it is important
f
Importing is fine. U can add a post a trigger for user pool like this
Copy code
const authChallengeFn = new sst.Function(this, 'AuthChallengeFn', {
  handler: 'src/authChallenge.main',
});
userPool.addTrigger(cognito.UserPoolOperation.CREATE_AUTH_CHALLENGE, authChallengeFn);
a
ooo big thanks to you 🙂
f
This sets the CREATE_AUTH_CHALLENGE trigger, just change that to the trigger u want to add.
a
yea, I see
f
Forgive me on the bad code format.. wrote that on my phone lol
a
don’t worry, the main thing I can understand how to do it now
thanks for you help