-
-
Notifications
You must be signed in to change notification settings - Fork 469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flask RemoteApp.authorize_access_token() includes state parameter in request #16
Comments
@lyschoening Did you try the Google connect on https://play.authlib.org/ ? Which works pretty well. Besides, that |
@lepture Is https://play.authlib.org/ a Flask app/sending the state parameter? I'm authorizing through https://accounts.google.com/o/oauth2/token, not https://www.googleapis.com/oauth2/v4/token, which could explain why the behavior is different. Google's documentation does not mention a state parameter |
I should add that |
@lyschoening Is there any reason that you have to use I'm ok to change the default behavior of |
@lepture It's the URL in the configuration the Google Cloud console returns when you create an OAuth client for a web application. |
@lyschoening I've cleaned up params in Here is the endpoints that I found for Google: https://accounts.google.com/.well-known/openid-configuration |
This bug is introduced by lepture/authlib#16
When following the typical authorization flow, the access token is requested from the authorization redirect URI. The RemoteApp implementation for Flask copies all request arguments of this callback and attaches them to the request for the authorization token.
authlib/authlib/flask/client/oauth.py
Line 190 in e01aafd
The request arguments to the callback include "state", which does not need to be submitted with the request for the access token. Due to this, the Google API will respond with an error: "Parameter not allowed for this message type: state".
The text was updated successfully, but these errors were encountered: