-
Notifications
You must be signed in to change notification settings - Fork 16.8k
Adaptions for custom auth manager example in documentation#59355
Adaptions for custom auth manager example in documentation#59355vincbeck merged 3 commits intoapache:mainfrom
Conversation
Description
We went through the process to create a custom auth manager for API auth and found some small problems in the example how to create a custom auth manager.
It's required to allow skipping rotate_session_id in auth_user_oauth, because otherwise there will be error messages like this one:
RuntimeError: Working outside of request context.
2025-12-12T07:02:12.688480736Z api-server
This typically means that you attempted to use functionality that needed
an active HTTP request. Consult the documentation on testing for
information about how to avoid this problem.
The other methods in FabSecurityManagerOverride like auth_user_db and auth_user_ldap also allow this already - we just need to add this also to auth_user_oauth.
Also the login_user function from flask_login needs to be removed from the example in the docs, because calling it results in the same error message.
- To be clarified with @vincbeck if this is fine
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.
potiuk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good @vincbeck ?