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 ?
Serverside in serverless?
You should look at the Userpool triggers like the PostConfirmation trigger. I think that is what you are looking for.
i want to create user , generate user token and return the token all in the one funciton
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.
i would be generating it from inside a oauth verification endpoint, then redirecting and sending it to front end over https