Hey, I came across flask_cognito and it seems like a really interesting and good project.
But, as a beginner, it is a bit complicated to understand how this package should be used.
For example: In the readme there is information about initialization with the following code:
@cogauth.identity_handler
def lookup_cognito_user(payload):
"""Look up user in our database from Cognito JWT payload."""
return User.query.filter(User.cognito_username == payload['username']).one_or_none()
Here, it is really confusing and difficult to understand from where the User comes into play and also what the payload is. I am assuming it is a basic user model (as shown in this tutorial: https://realpython.com/token-based-authentication-with-flask/).
So, it would be great if you can update the readme to include kind of a step-by-step walkthrough.
If there is already an existing tutorial for this, could you please point me to it?
Hey, I came across flask_cognito and it seems like a really interesting and good project.
But, as a beginner, it is a bit complicated to understand how this package should be used.
For example: In the readme there is information about initialization with the following code:
Here, it is really confusing and difficult to understand from where the
User
comes into play and also what thepayload
is. I am assuming it is a basic user model (as shown in this tutorial: https://realpython.com/token-based-authentication-with-flask/).So, it would be great if you can update the readme to include kind of a step-by-step walkthrough.
If there is already an existing tutorial for this, could you please point me to it?
Thanks & Cheers!