Skip to content
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

need help on custom oauth2 provider with airflow 2.6 #2286

Open
zhouxm2022 opened this issue Nov 10, 2024 · 0 comments
Open

need help on custom oauth2 provider with airflow 2.6 #2286

zhouxm2022 opened this issue Nov 10, 2024 · 0 comments

Comments

@zhouxm2022
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant