refactor: update use of SetAuthCookie

This commit is contained in:
Derrick Hammer 2024-03-17 09:15:24 -04:00
parent e7393085b4
commit 5861e95fb5
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 4 deletions

View File

@ -118,8 +118,7 @@ func (a AccountAPI) login(jc jape.Context) {
return
}
account.SetAuthCookie(jc, middleware.DEFAULT_AUTH_COOKIE_NAME, jwt)
account.SetAuthCookie(jc, authCookieName, jwt)
account.SetAuthCookie(jc, "")
account.SendJWT(jc, jwt)
jc.Encode(&LoginResponse{
@ -214,8 +213,7 @@ func (a AccountAPI) otpValidate(jc jape.Context) {
return
}
account.SetAuthCookie(jc, middleware.DEFAULT_AUTH_COOKIE_NAME, jwt)
account.SetAuthCookie(jc, authCookieName, jwt)
account.SetAuthCookie(jc, "")
account.SendJWT(jc, jwt)
jc.Encode(&LoginResponse{