raefezzeldin opened a new issue #16789:
URL: https://github.com/apache/airflow/issues/16789
I am deploying the following webserver_config.py
```
import os
from airflow.configuration import conf
from flask_appbuilder.security.manager import AUTH_OAUTH
SQLALCHEMY_DATABASE_URI = conf.get("core", "SQL_ALCHEMY_CONN")
CSRF_ENABLED = True
AUTH_TYPE = AUTH_OAUTH
AUTH_USER_REGISTRATION_ROLE = "Admin"
OAUTH_PROVIDERS = [
{
"name": "azure",
"icon": "fa-windows",
"token_key": "access_token",
"remote_app": {
"client_id": os.environ.get("AZURE_APP_ID"),
"client_secret": os.environ.get("AZURE_CLIENT_SECRET"),
"redirect_uri" :
"https://airflow.my-domain.com/oauth-authorized/azure",
"base_url": "https://graph.microsoft.com/v1.0/",
"request_token_params": {
"scope": "User.read email profile",
"resource": os.environ.get("AZURE_APPLICATION_ID"),
},
"request_token_url": None,
"access_token_url": azure_authority + "/token",
"authorize_url": azure_authority + "/authorize",
},
},
]
```
when I try login the following error appears to me:
Something bad has happened.
Please consider letting us know by creating a bug report using GitHub.
```
Python version: 3.6.13
Airflow version: 2.1.1
Node: airflow-webserver-7957f85cd-8ljvr
-------------------------------------------------------------------------------
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.6/site-packages/flask/app.py", line
2447, in wsgi_app
response = self.full_dispatch_request()
File "/home/airflow/.local/lib/python3.6/site-packages/flask/app.py", line
1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/airflow/.local/lib/python3.6/site-packages/flask/app.py", line
1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/airflow/.local/lib/python3.6/site-packages/flask/_compat.py",
line 39, in reraise
raise value
File "/home/airflow/.local/lib/python3.6/site-packages/flask/app.py", line
1950, in full_dispatch_request
rv = self.dispatch_request()
File "/home/airflow/.local/lib/python3.6/site-packages/flask/app.py", line
1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File
"/home/airflow/.local/lib/python3.6/site-packages/flask_appbuilder/security/views.py",
line 695, in oauth_authorized
resp =
self.appbuilder.sm.oauth_remotes[provider].authorize_access_token()
File
"/home/airflow/.local/lib/python3.6/site-packages/authlib/integrations/flask_client/remote_app.py",
line 74, in authorize_access_token
params = self.retrieve_access_token_params(flask_req, request_token)
File
"/home/airflow/.local/lib/python3.6/site-packages/authlib/integrations/base_client/base_app.py",
line 145, in retrieve_access_token_params
params = self._retrieve_oauth2_access_token_params(request, params)
File
"/home/airflow/.local/lib/python3.6/site-packages/authlib/integrations/base_client/base_app.py",
line 126, in _retrieve_oauth2_access_token_params
raise MismatchingStateError()
authlib.integrations.base_client.errors.MismatchingStateError:
mismatching_state: CSRF Warning! State not equal in request and response.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]