weapp-cookie
weapp-cookie copied to clipboard
一行代码让微信、头条、百度、支付宝小程序支持 cookie,兼容 uni-app 🍪🚀 One line of code allows weapp to support cookie(wx weixin wxapp cookie)
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2. Release notes Sourced from decode-uri-component's releases. v0.2.2 Prevent overwriting previously decoded tokens 980e0bf https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2 v0.2.1 Switch to GitHub workflows 76abc93 Fix issue where decode...
Bumps [minimatch](https://github.com/isaacs/minimatch) to 3.0.4 and updates ancestor dependency [gulp](https://github.com/gulpjs/gulp). These dependencies need to be updated together. Updates `minimatch` from 0.2.14 to 3.0.4 Commits e46989a v3.0.4 ddfacbd update brace-expansion 55ed736 update...
Cookie构造函数,在max-age为0时会赋值为null ```js constructor (props) { this.name = props.name || '' this.value = props.value || '' // other this.domain = props.domain || '' this.path = props.path || '/' this.expires = props.expires...
解决方案: 在`src/cookieShim.js`文件中 将 ```JavaScript Object.defineProperties(api, { // request requestWithCookie: { value: requestProxy, }, // uploadFile uploadFileWithCookie: { value: uploadFileProxy, }, // downloadFile downloadFileWithCookie: { value: downloadFileProxy, } }) ``` 这里`Object.defineProperties(api`...
我把dist目录下的weapp-cookie.js放到了我项目中的utils目录中,然后在app.js中引入了,就报错了。 我的小程序项目使用了插件,文档中说小程序插件的安全机制,不允许改写wx.request方法。 变通的方法是使用别名。但是现在我想让这个不报错。请问怎么让这个先不报错呀  
在我们的微信小程序版本里面用到了这个优秀的开源库。 我们的线上版本小程序使用了较为老的版本,不支持wx.request 返回值,由于业务需求,更新到了支持返回值的版本。 在测试回归的过程中发现以下问题 1、线上版本登录(老版本的cookie 库) 2、开发使用较为新版本的cookie库 此时小程序会给开线上版本的cookie storage里面的内容copy到开发版本里面 3、因此,此时开发版本具有cookie登录态 4、在开发版本(使用了较新的cookie库)执行一次业务的logout(未清理cookie storage) 5、出现登录问题 原因:未清理cookiestorage,老版本的domain使用的原值,而新版本使用的则是 **.domain** (注意前面的小数点) 之前的代码变更记录: https://github.com/charleslo1/weapp-cookie/commit/da3b65b7696216007fdbaf1bbe33155b4bdf414c#diff-551481066803574ad76d2485fe6c3b27c4800a1140c27d4a62a6d84442c9dde1R273 -------- 问题修正: 1、使用数据隔离策略,线上和线下使用不同的cookie storage key, 相当于给线上的cookie都暂时废了,用户都需要重新登录一遍。 2、在logout时同时清空对应的cookie 期望: 作为一个使用量比较多的库,有一个 release note之类的,提醒用户升级的注意事项。
uni-app在执行清除指定cookie操作后,小程序端cookie正常清除,安卓端也通过控制台打印cookie也应该清除了,但是在发起request请求时安卓app还是会携带已经被清除了的cookie,请问这个怎么整
现在我再A接口返回的 Set-Cookie:` cookieName=xxxxxx; Domain=.a.com; Path=/` B接口是www.b.com:2443,无法上送cookieName; 代码里面应该有判断是否跨域上送cookie的配置,希望可以设置关闭,谢谢 发现这个文件解析有问题 `/weapp-cookie/src/util.js` ```javascript getCookieScopeDomain (domain = '') { if (!domain) return [] // 获取 cookie 作用域范围列表 domain = domain.replace(/^\.+/ig, '') let scopes =...