fix(audit): audit login/logout for new 3rd-party auth (#6733)

* fix(audit): audit login/logout for new 3rd-party auth

* no longer auditing unknown users
This commit is contained in:
Kira Pilot
2023-03-22 12:52:13 -07:00
committed by GitHub
parent df31636e72
commit 25e92fd2f4
7 changed files with 15 additions and 94 deletions

View File

@ -424,7 +424,6 @@ func (api *API) userOAuth2Github(rw http.ResponseWriter, r *http.Request) {
})
return
}
aReq.UserID = user.ID
cookie, key, err := api.oauthLogin(r, oauthLoginParams{
User: user,
@ -453,6 +452,7 @@ func (api *API) userOAuth2Github(rw http.ResponseWriter, r *http.Request) {
return
}
aReq.New = key
aReq.UserID = key.UserID
http.SetCookie(rw, cookie)
@ -714,7 +714,6 @@ func (api *API) userOIDC(rw http.ResponseWriter, r *http.Request) {
})
return
}
aReq.UserID = user.ID
cookie, key, err := api.oauthLogin(r, oauthLoginParams{
User: user,
@ -745,6 +744,7 @@ func (api *API) userOIDC(rw http.ResponseWriter, r *http.Request) {
return
}
aReq.New = key
aReq.UserID = key.UserID
http.SetCookie(rw, cookie)