Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the password of a cognito user as the admin?

Via the cognito admin API how do I set a users password? When a user is created I can set a temporary password, I need to be able to do this to an existing user.

like image 884
Justin808 Avatar asked Jan 31 '18 19:01

Justin808


People also ask

How do I authenticate someone on Cognito?

2.1. Go to AWS Cognito service and click “Manage Identity Pools”. 2. Enter “Identity pool name”, expand the “Authentication providers” section and select “Cognito” tab. This is where the Cognito authentication provider will be registered with the Identity pool.

Does Cognito hash passwords?

Cognito Identity uses the token from the identity provider to obtain a unique identifier for the user and then hashes it using a one-way hash so that the same user can be recognized again in the future without storing the actual user identifier.

What is Scope AWS Cognito signin user admin?

signin. user. admin scope grants access to Amazon Cognito user pool API operations that require access tokens, such as UpdateUserAttributes and VerifyUserAttribute. The profile scope grants access to all user attributes that are readable by the client. This scope can only be requested with the openid scope.


2 Answers

The newest version of the cognito api adds an action AdminSetUserPassword which has a request syntax like the following

{
   "Password": "string",
   "Permanent": boolean,
   "Username": "string",
   "UserPoolId": "string"
}

and will allow you to set a permanent or temporary password for a given user.

like image 80
Pedro del Sol Avatar answered Nov 26 '22 11:11

Pedro del Sol


EDIT-2: The newest version of cognito API now supports AdminSetUserPassword.

You can't set a users password, the only thing you can do is use AdminResetUserPassword.

EDIT: You can call ForgotPassword too. But as the name suggests this is supposed to be called by a user, not an admin.

like image 23
F_SO_K Avatar answered Nov 26 '22 13:11

F_SO_K