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


##########
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:
   Updated. Following the `stamp_login_time` pattern, moved the logic to 
`init_session_token_generation` in `init_session.py`. So a custom 
`SECURITY_MANAGER_CLASS` can't skip either part. It's also wired for the 
plugins app, since with `securecookie` that app reads the same login session.



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