How to get the idToken for a user without the user's password? AWS-Cognito

Viewed 794

I am using AWS Cognito for the user management. I want to achieve a feature called "login as". Basically, the admin can use this feature to login as a specific user. The APIs I designed require idTokens for the authentication. So if I am able to get the idToken of a user, then I am able to login as the user.

Therefore, the question is "is there a way or Cognito API to get the idToken of a specific user without user's password?".

1 Answers

No this isn't possible and there is a very good reason for it. It ensures that the admin cannot simply log in as user and make changes under his name. Only the user is allowed to use his account. If that wasn't the case you would not have data integrity or non-repudiation

Related