Skip to content

Instantly share code, notes, and snippets.

@youngsoul
Created March 11, 2020 22:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save youngsoul/892c6d5b911034df2cdb6e49a43058a1 to your computer and use it in GitHub Desktop.
Save youngsoul/892c6d5b911034df2cdb6e49a43058a1 to your computer and use it in GitHub Desktop.
snippet showing how to have a user login into a Cognito User Pool
resp=client.initiate_auth(
ClientId=os.getenv('CLIENT_ID'),
AuthFlow='USER_PASSWORD_AUTH',
AuthParameters={
'USERNAME': email,
'SECRET_HASH': get_secret_hash(email, os.getenv('CLIENT_ID'), os.getenv('CLIENT_SECRET')),
'PASSWORD': password,
})
return resp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment