Describe the bug
Set both expires: 10 and sameSite: 'strict' at the same time seems lost strict in Safari.
It is not a problem of this library per se since manually setting the cookie in Safari would also destroy strict.
To Reproduce
Cookies.set('foo', 'bar');
Cookies.set('strictFoo', 'strictBar', { sameSite: 'strict' });
Cookies.set('strictFooWithExpires', 'strictBarWithExpires', { expires: 10, sameSite: 'strict' });
Expected behavior
strictFooWithExpires should be strict in sameSite field
Screenshots

Desktop (please complete the following information):
Additional context
Works fine with chrome
It is not a problem of this library per se since manually setting the cookie in Safari would also destroy strict
So it‘s a bug in Safari?
@carhartl Yeah, I think so.
I would not tag a 'Bug' label if there is a 'General info' option for me to create an issue though. However, I think it might be helpful to keep it track here for potential inquiries.
@edwardfhsiao
I've tried it myself and it works for me... could you try with all cookies cleared before and maybe check whether you have some extensions active that may interfere?



Found the problem
// does work when expire days below 7
Cookies.set('strictFooWithExpires', 'strictBarWithExpires', { expires: 7, sameSite: 'strict' });
// doesnot work when expire days over 7
Cookies.set('strictFooWithExpires', 'strictBarWithExpires', { expires: 8, sameSite: 'strict' });
It probably means that Safari automatically narrows days down to 7 if the number is greater than 7.
But I don't know why it destroys sameSite field as well.
Great find, wow... very interesting, seeing it as well.
Capping to 7 days is part of Safari‘s intelligent tracking prevention:
=> https://webkit.org/blog/8613/intelligent-tracking-prevention-2-1/
I guess that it‘s also stripping the SameSite attribute is a bug.
I wasn‘t aware of that until now.. Mentioning this behavior is probably worth adding to the FAQ.
absolutely, cheers :partying_face: