need help on custom oauth2 provider with airflow 2.6
Opened this issue · 0 comments
Environment
Flask-Appbuilder version: 4.3 w/ python 3.11/ airflow 2.6
Good morning,
I want to integrate a custom oauth2 provider with airflow2. I installed google provider. the configure in webserver_config.py is as follows.
Google OAuth example:
OAUTH_PROVIDERS = [{
'name':'xyz',
'token_key':'id_token',
'icon':'fa-google',
'remote_app': {
'api_base_url':'https://xyz/sso/oauth2/xyz/',
'client_kwargs':{
'scope': 'openid profile email'
},
'access_token_url':'https://xyz/sso/oauth2/xyz/access_token',
'authorize_url':'https://xyz/sso/oauth2/xyz/authorize',
'request_token_url': None,
'client_id': 'abc',
'client_secret': '285b95d9-abf6',
}
}]
app gets auth code. I used debug, I found the app doesn't send client code and secret in payload when it accesses to token url. it only sends auth code. so provider rejects the token request.
could someone please shed some light on it? any suggestions are welcome.
Thanks in advance.
Xiaoming