chore: update auth page (#1920)

* chore: update auth page

* chore: update
This commit is contained in:
boojack
2023-07-09 21:13:26 +08:00
committed by GitHub
parent 0292f472e0
commit da70917b08
6 changed files with 39 additions and 47 deletions

View File

@ -11,6 +11,7 @@ import (
"time"
"github.com/pkg/errors"
"github.com/usememos/memos/api/v1/auth"
"github.com/usememos/memos/server"
"github.com/usememos/memos/server/profile"
"github.com/usememos/memos/store"
@ -132,7 +133,7 @@ func (s *TestingServer) request(method, uri string, body io.Reader, params, head
h := resp.Header.Get("Set-Cookie")
parts := strings.Split(h, "; ")
for _, p := range parts {
if strings.HasPrefix(p, "access-token=") {
if strings.HasPrefix(p, fmt.Sprintf("%s=", auth.AccessTokenCookieName)) {
cookie = p
break
}