Closed devireds closed 4 years ago
Hi @devireds thanks for using the plugin. Can you please give some context and post the error message? Also, the code you posted seems to have few indentation errors, generally you can format it enclosing it between ```python
and ```
Hi @devireds thanks for using the plugin. Can you please give some context and post the error message? Also, the code you posted seems to have few indentation errors, generally you can format it enclosing it between ```python
and ```
Thank you for the quick response @babaMar I have updated my comment with proper formatting and the error message. Appreciate your help!
Hi @devireds thanks for using the plugin. Can you please give some context and post the error message? Also, the code you posted seems to have few indentation errors, generally you can format it enclosing it between
python and
Thank you for the quick response @babaMar I have updated my comment with proper formatting and the error message. Appreciate your help!
Guess you have installed with pip
? Because the get_user_info(...)
has been recently added and the PyPi release does not include that. If that's the case cloning the project would solve the issue
Hi @devireds thanks for using the plugin. Can you please give some context and post the error message? Also, the code you posted seems to have few indentation errors, generally you can format it enclosing it between
python and
Thank you for the quick response @babaMar I have updated my comment with proper formatting and the error message. Appreciate your help!
Guess you have installed with
pip
? Because theget_user_info(...)
has been recently added and the PyPi release does not include that. If that's the case cloning the project would solve the issue
Thank you. Yes, I did install the package using pip. Will try to clone the project and update the outcome.
Also, I assume that you are using this plugin in your app. How are you maintaining the session? Are you string the access_token on client side and passing it every time or using any cookie mechanism?
Which session specifically?
We use it by instantiating it aws_auth = AWSCognitoAuthentication()
and then decorating the endpoints with @aws_auth.authentication_required
. After that, cognito_claims
are made available in the Flask request context g
by g.cognito_claims
@devireds let me know if I can close the issue
Uninstalling the pip package and cloning the project did the thing. Thanks for the quick pointer.
My application architecture:
Once we get the the access_token from Cognito, how do we store the access-token so that the user can send the token with in the subsequent requests? Thank you!
Which session specifically?
We use it by instantiating it
aws_auth = AWSCognitoAuthentication()
and then decorating the endpoints with@aws_auth.authentication_required
. After that,cognito_claims
are made available in the Flask request contextg
byg.cognito_claims
Firstly, thank you for developing this plugin. It's very useful.
I was successfully able to integrate this plugin with my application on AWS with API Gateway.
In my code, both sign_in() and aws_cognito_redirect() works without any issues. However, when I try to use aws_auth.get_user_info(access_token) in userdata(), I am getting the following error.