NIK-TIGER-BILL opened a new pull request, #64457:
URL: https://github.com/apache/airflow/pull/64457
fix: add `authlib` as optional `oauth` extra to FAB provider, so users can
install it with `pip install apache-airflow-providers-fab[oauth]`.
`authlib` is imported at runtime inside `FabAuthManager`'s security-manager
override whenever OAuth is enabled:
- `authlib.integrations.flask_client.OAuth` – provider registration
(`AUTH_OAUTH`)
- `authlib.jose.JsonWebKey` / `authlib.jose.jwt` – JWT validation (Azure,
generic OIDC)
`flask-appbuilder 5.x` already exposes authlib under **its own** `[oauth]`
extra (`Authlib<2.0.0,>=0.14`), but `apache-airflow-providers-fab` never
re-exported it. Users who enable OAuth have to install `authlib` manually, and
receive an unhelpful `ModuleNotFoundError` at login time with no hint about
which package is missing.
This commit adds an `oauth` optional-dependency group to
`providers/fab/pyproject.toml`, mirroring the existing `kerberos` pattern:
```toml
[project.optional-dependencies]
"oauth" = [
"authlib>=1.0.0",
]
```
Users can now install it explicitly:
```
pip install 'apache-airflow-providers-fab[oauth]'
```
closes: #64456
---
##### Was generative AI tooling used to co-author this PR?
- [ ] Yes (please specify the tool below)
--
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]