mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-30 22:39:17 +08:00
Backport #11447 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
878434146f
commit
de9a96c4de
@ -988,11 +988,8 @@ func LinkAccountPostRegister(ctx *context.Context, cpt *captcha.Captcha, form au
|
|||||||
}
|
}
|
||||||
|
|
||||||
func handleSignOut(ctx *context.Context) {
|
func handleSignOut(ctx *context.Context) {
|
||||||
_ = ctx.Session.Delete("uid")
|
_ = ctx.Session.Flush()
|
||||||
_ = ctx.Session.Delete("uname")
|
_ = ctx.Session.Destroy(ctx.Context)
|
||||||
_ = ctx.Session.Delete("socialId")
|
|
||||||
_ = ctx.Session.Delete("socialName")
|
|
||||||
_ = ctx.Session.Delete("socialEmail")
|
|
||||||
ctx.SetCookie(setting.CookieUserName, "", -1, setting.AppSubURL, setting.SessionConfig.Domain, setting.SessionConfig.Secure, true)
|
ctx.SetCookie(setting.CookieUserName, "", -1, setting.AppSubURL, setting.SessionConfig.Domain, setting.SessionConfig.Secure, true)
|
||||||
ctx.SetCookie(setting.CookieRememberName, "", -1, setting.AppSubURL, setting.SessionConfig.Domain, setting.SessionConfig.Secure, true)
|
ctx.SetCookie(setting.CookieRememberName, "", -1, setting.AppSubURL, setting.SessionConfig.Domain, setting.SessionConfig.Secure, true)
|
||||||
ctx.SetCookie(setting.CSRFCookieName, "", -1, setting.AppSubURL, setting.SessionConfig.Domain, setting.SessionConfig.Secure, true)
|
ctx.SetCookie(setting.CSRFCookieName, "", -1, setting.AppSubURL, setting.SessionConfig.Domain, setting.SessionConfig.Secure, true)
|
||||||
|
Loading…
Reference in New Issue
Block a user