User sign-up with admin confirmation

User sign-up with admin confirmation is similar to self-confirmation, as indicated by the following steps:

  1. Use the sign-up sub-command to initiate the sign-up flow, as follows:
aws cognito-idp sign-up 
--client-id 4s69op0v8es2cojl5ncjql2v4g
--username testuser4
--password Passw0rd$

The email is optional here, since the user will be confirmed by an admin. However, you may specify an email and it will send the verification code, as we had specified the email as an AutoVerifiedAttributes while creating the user pool.

If this is successful, you should get the following response:

  1. Confirm the user as an admin, as follows:
aws cognito-idp admin-confirm-sign-up 
--user-pool-id us-east-1_fYsb1Gyec
--username testuser4
--profile admin

If this is successful, you should not see a response.

  1. Now, try to sign-in with your username and password, as follows:
aws cognito-idp initiate-auth 
--client-id 4s69op0v8es2cojl5ncjql2v4g
--auth-flow USER_PASSWORD_AUTH
--auth-parameters USERNAME=testuser4,PASSWORD=Passw0rd$

If it is successful, you will get a response with the AccessToken, RefreshToken, and IdToken, similar to the one in the self-confirmation flow.

  1. You can delete the user by using the delete-user sub-command (refer to the self-confirmation flow).
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.123.126