chore: tweak cookie attrs

This commit is contained in:
Steven 2024-02-05 00:10:54 +08:00
parent b056c59dea
commit 9e72432f19

View file

@ -231,7 +231,7 @@ func (*APIV2Service) SignOut(ctx context.Context, _ *apiv2pb.SignOutRequest) (*a
func clearAccessTokenCookie(ctx context.Context) error {
if err := grpc.SetHeader(ctx, metadata.New(map[string]string{
"Set-Cookie": fmt.Sprintf("%s=; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT; HttpOnly; SameSite=Strict", auth.AccessTokenCookieName),
"Set-Cookie": fmt.Sprintf("%s=; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT; HttpOnly; SameSite=None; Secure", auth.AccessTokenCookieName),
})); err != nil {
return errors.Wrap(err, "failed to set grpc header")
}