Some background information. According to HTTP specification, there is not way to delete a cookie. The common approach to clear cookies is to set the expiration time to a time in the past (the clearCookie function in express uses this approach)
source code of clearCookie()
res.clearCookie = function clearCookie(name, options) {
var opts = merge({ expires: new Date(1), path: '/' }, options);
return this.cookie(name, '', opts);
}
Problem might be with the cookie-setting problems caused by the new privacy features in IOS 14, meaning that there is a very strict policy on cookies that are allowed to be set. Possible that "setting expiration to the past" method used by "clearCookie" is not allowed in IOS 14. See more about the new privacy features in IOS 14 here
Btw, be sure to check the "path" attribute is correct in the "options" object
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…