Skip to content

Instantly share code, notes, and snippets.

@gowthamgts
Created March 26, 2019 10:04
Show Gist options
  • Save gowthamgts/7e300a73cc46b2c6b58ecbb70250be51 to your computer and use it in GitHub Desktop.
Save gowthamgts/7e300a73cc46b2c6b58ecbb70250be51 to your computer and use it in GitHub Desktop.
Confirm a user in cognito
# initiate and get session token
aws cognito-idp admin-initiate-auth --user-pool-id <pool_id> --client-id <client_id> --auth-flow ADMIN_NO_SRP_AUTH\
--auth-parameters USERNAME=<username>,PASSWORD=<pw>
# update with new password
aws cognito-idp admin-respond-to-auth-challenge --user-pool-id <pool_id> \
--client-id <client_id> --challenge-name NEW_PASSWORD_REQUIRED \
--challenge-responses NEW_PASSWORD=<new_password>,USERNAME=<username>,userAttributes.name="<if there are any>"\
--session "<session_key>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment