Skip to content

Instantly share code, notes, and snippets.

@daviwesley
Created October 26, 2023 16:34
Show Gist options
  • Save daviwesley/ad9f93c33a8b3891d1631bddc52b2378 to your computer and use it in GitHub Desktop.
Save daviwesley/ad9f93c33a8b3891d1631bddc52b2378 to your computer and use it in GitHub Desktop.
Get jwt token from cognito url
curl --location 'https://cognito-idp.sa-east-1.amazonaws.com/' \
--header 'X-Amz-Target: AWSCognitoIdentityProviderService.InitiateAuth' \
--header 'Content-Type: application/x-amz-json-1.1' \
--data-raw '{
"AuthFlow": "USER_PASSWORD_AUTH",
"AuthParameters": {
"PASSWORD": "mysafepassw@rd",
"USERNAME": "username@gmail.com"
},
"ClientId": "3hgver6a6mj336cnbefus3ta1p"
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment