Cognito User Id Token

aws

#1

Is it possible on the serverside to generate an Id token ( i.e. same type as returned by user.getSession.getIdToken() ) for a Cognito User just created there ?


#2

Serverside in serverless?

You should look at the Userpool triggers like the PostConfirmation trigger. I think that is what you are looking for.


#3

i want to create user , generate user token and return the token all in the one funciton


#4

Yes. You can do this with the triggers and return it as part of the event. I would not advice to do this for security reasons, but may be okay depending on your use case.


#5

i would be generating it from inside a oauth verification endpoint, then redirecting and sending it to front end over https