cookies are bound site wide

This commit is contained in:
James Tombleson 2024-05-18 22:38:31 -07:00
parent 218ccaf9ec
commit be8fc7cfaa

View File

@ -22,9 +22,9 @@ func (h *Handler) UserAfterLogin(c echo.Context) error {
return Render(c, http.StatusBadRequest, users.AfterLogin(err.Error(), false))
}
SetCookie(c, domain.CookieToken, resp.Token)
SetCookie(c, domain.CookieRefreshToken, resp.RefreshToken)
SetCookie(c, domain.CookieUser, user)
SetCookie(c, domain.CookieToken, resp.Token, "/")
SetCookie(c, domain.CookieRefreshToken, resp.RefreshToken, "/")
SetCookie(c, domain.CookieUser, user, "/")
return Render(c, http.StatusOK, users.AfterLogin("Login Successful!", true))
}