Oauth 2.0 谷歌oAuth失败

Oauth 2.0 谷歌oAuth失败,oauth-2.0,google-oauth,airflow,Oauth 2.0,Google Oauth,Airflow,我正在气流上设置GoogleOAuth。 由于气流位于AWS lb后面,我设置了转发\u允许\u IP:“*” 我添加了下面的配置 [google] client_id = google_client_id client_secret = google_client_secret oauth_callback_route = /oauth2callback domain = example1.com 但是我得到了错误flask\u oauthlib.client.OAuthException:

我正在气流上设置GoogleOAuth。 由于气流位于AWS lb后面,我设置了
转发\u允许\u IP:“*”

我添加了下面的配置

[google]
client_id = google_client_id
client_secret = google_client_secret
oauth_callback_route = /oauth2callback
domain = example1.com
但是我得到了错误
flask\u oauthlib.client.OAuthException:来自google的无效响应

我试图设置调试

2020-11-02T23:40:55.384727843Z [2020-11-02 23:40:55,384] {client.py:662} DEBUG - Prepare oauth2 remote args "\x1b[01m{'code': 'some_code', 'client_secret': 'secret', 'redirect_uri': 'https://AIRFLOW__WEBSERVER__BASE_URL/oauth2callback'}\x1b[22m"
2020-11-02T23:40:55.385210970Z [2020-11-02 23:40:55,385] {client.py:401} DEBUG - Request 'https://accounts.google.com/o/oauth2/token' with 'POST' method
2020-11-02T23:40:55.501700929Z [2020-11-02 23:40:55,499] {app.py:1892} ERROR - Exception on /oauth-authorized/google [GET]
2020-11-02T23:40:55.501748263Z Traceback (most recent call last):
2020-11-02T23:40:55.501752138Z   File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2447, in wsgi_app
2020-11-02T23:40:55.501754966Z     response = self.full_dispatch_request()
2020-11-02T23:40:55.501757302Z   File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1952, in full_dispatch_request
2020-11-02T23:40:55.501759679Z     rv = self.handle_user_exception(e)
2020-11-02T23:40:55.501761683Z   File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1821, in handle_user_exception
2020-11-02T23:40:55.501763952Z     reraise(exc_type, exc_value, tb)
2020-11-02T23:40:55.501765985Z   File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
2020-11-02T23:40:55.501768197Z     raise value
2020-11-02T23:40:55.501770212Z   File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1950, in full_dispatch_request
2020-11-02T23:40:55.501772483Z     rv = self.dispatch_request()
2020-11-02T23:40:55.501774489Z   File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1936, in dispatch_request
2020-11-02T23:40:55.501776698Z     return self.view_functions[rule.endpoint](**req.view_args)
2020-11-02T23:40:55.501778785Z   File "/usr/local/lib/python3.6/site-packages/flask_appbuilder/security/views.py", line 677, in oauth_authorized
2020-11-02T23:40:55.501781923Z     resp = self.appbuilder.sm.oauth_remotes[provider].authorized_response()
2020-11-02T23:40:55.501796278Z   File "/usr/local/lib/python3.6/site-packages/flask_oauthlib/client.py", line 708, in authorized_response
2020-11-02T23:40:55.501799946Z     data = self.handle_oauth2_response(args)
2020-11-02T23:40:55.501802880Z   File "/usr/local/lib/python3.6/site-packages/flask_oauthlib/client.py", line 693, in handle_oauth2_response
2020-11-02T23:40:55.501806444Z     type='invalid_response', data=data
2020-11-02T23:40:55.501810392Z flask_oauthlib.client.OAuthException: Invalid response from google