sjyangkevin commented on code in PR #77138:
URL: https://github.com/apache/airflow/pull/77138#discussion_r4648281975


##########
providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py:
##########
@@ -601,7 +607,10 @@ def create_login_manager(self) -> LoginManager:
         lm = LoginManager(current_app)
         lm.anonymous_user = AnonymousUser
         lm.login_view = "login"
-        lm.user_loader(self.load_user)
+        lm.user_loader(self.load_session_user)
+        # Scoped to this app: ``user_logged_in`` is shared by every Flask app 
in the process.
+        app = current_app._get_current_object()  # type: ignore[attr-defined]
+        user_logged_in.connect(_record_session_token_generation, sender=app)

Review Comment:
   Still working on this feedback. If I understand correctly. The expected 
implementation is to move the three lines totally out of `create_login_manager` 
because it could be overridden and in that case, our logic would be skipped.



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