Skip to content

Instantly share code, notes, and snippets.

View durakkerem's full-sized avatar
💯

Kerem Durak durakkerem

💯
  • Istanbul, Turkey
View GitHub Profile
@durakkerem
durakkerem / aws_cognito_auth.py
Last active August 30, 2021 23:07
Python example of AWS Cognito Authentication with username and password
"""
Username password based authentication with no SRP (secure remote password)
STEPS:
* Authorize using the /authorize endpoint and get the XSRF-TOKEN
* Use the /login endpoint to get the authentication code
* Get the access tokens using the /oauth2/token endpoint
"""
import json
import requests