anavrotski opened a new issue, #57485:
URL: https://github.com/apache/airflow/issues/57485

   ### Apache Airflow version
   
   3.1.1
   
   ### If "Other Airflow 2/3 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   After pressing log out - log in is impossible if OAuth enabled.
   After rolling back to Airflow 3.1.0 - everything works.
   API server log:
   
   > api-server INFO:     172.25.117.209:55662 - "GET 
/auth/login/azure?next=https%3A//...our airflow host.../ HTTP/1.1" 302 Found
   api-server 2025-10-29T11:50:29.527746Z [error    [] Exception on 
/oauth-authorized/azure [GET[] [airflow.providers.fab.www.app] loc=app.py:1744
   api-server Traceback (most recent call last):
   api-server   File 
"/home/airflow/.local/lib/python3.12/site-packages/flask/app.py", line 2529, in 
wsgi_app
   api-server     response = self.full_dispatch_request()
   api-server                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   api-server   File 
"/home/airflow/.local/lib/python3.12/site-packages/flask/app.py", line 1825, in 
full_dispatch_request
   api-server     rv = self.handle_user_exception(e)
   api-server          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   api-server   File 
"/home/airflow/.local/lib/python3.12/site-packages/flask/app.py", line 1823, in 
full_dispatch_request
   api-server     rv = self.dispatch_request()
   api-server          ^^^^^^^^^^^^^^^^^^^^^^^
   api-server   File 
"/home/airflow/.local/lib/python3.12/site-packages/flask/app.py", line 1799, in 
dispatch_request
   api-server     return 
self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
   api-server            
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   api-server   File 
"/home/airflow/.local/lib/python3.12/site-packages/flask_appbuilder/security/views.py",
 line 713, in oauth_authorized
   api-server     user = self.appbuilder.sm.auth_user_oauth(userinfo)
   api-server            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   api-server   File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/providers/fab/auth_manager/security_manager/override.py",
 line 2031, in auth_user_oauth
   api-server     user = self.find_user(username=username)
   api-server            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   api-server   File 
"/home/airflow/.local/lib/python3.12/site-packages/airflow/providers/fab/auth_manager/security_manager/override.py",
 line 1426, in find_user
   api-server     return self.session.scalars(
   api-server            ^^^^^^^^^^^^^^^^^^^^^
   api-server   File 
"/home/airflow/.local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", 
line 2459, in scalars
   api-server     return self._execute_internal(
   
    
   
   ### What you think should happen instead?
   
   _No response_
   
   ### How to reproduce
   
   We are using OAuth with Azure, nothing was chaged just Airflow docker image 
updated.
   
   ### Operating System
   
   linux
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   AWS EKS, official chart 1.18
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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]

Reply via email to