fix(auth): record last sign-in on reverse proxy login (#38672)

Reverse proxy and SSPI logins establish a session but never recorded
`last_login_unix`, so those users stayed "Never Signed-In" in admin.

The write is folded into the language update that `handleSignIn` already
does, so it stays at one query and only runs when a session is
established.

Fixes https://github.com/go-gitea/gitea/issues/7836

---------

Co-authored-by: roman s <roman.sukach@dust-labs.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
roman.s
2026-08-23 11:39:44 +03:00
committed by GitHub
parent 1c16f04bf5
commit 4852091e85
4 changed files with 51 additions and 12 deletions
+1 -1
View File
@@ -121,7 +121,7 @@ func (s *SSPI) Verify(req *http.Request, w http.ResponseWriter, store DataStore,
}
if s.CreateSession {
handleSignIn(w, req, sess, user)
handleSignInNonInteractive(w, req, sess, user)
}
log.Trace("SSPI Authorization: Logged in user %-v", user)