-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JWT token 解析错误 #8360
Comments
补充一下,个人怀疑和window有关,我们实际使用是, https://github.com/kala888/nice-router-taro/blob/master/src/nice-router/auth-tools.js 有时候报错,有时候不报错,但是我issue中提供的代码,是百分百报错 |
目测和这个问题原因一致 #8273 在你执行 decode 前这样设置试试: window.Date = Date
window.setTimeout = setTimeout |
@Chen-jj 设置了,不起作用。 可以下载项目https://github.com/kala888/nice-router-taro 然后点击 首页上的Login 页面,再点击登录,复现bug |
@kala888 3.0.17 开始,我们把小程序 |
@Chen-jj 直接修改jwt-decode的源码,确认是这个问题,但是在onLaunch中移除atob方法,不顶用 |
3.1.4 好像还没修复 |
@kala888 请问你的解决了吗 |
@kala888 好吧,那只能这样了 |
我们在 Taro 内部删掉 |
相关平台
微信小程序
复现仓库
https://github.com/kala888/nice-router-taro
小程序基础库: 2.14.0
使用框架: React
复现步骤
taro 3.0.21 出现此问题,版本降到 3.0.16不会出现
期望结果
能够支持该js 组件
实际结果
报错Illegalinvocation
环境信息
The text was updated successfully, but these errors were encountered: