Skip to content
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

我向服务器注册了一个用户,带token, 再在前端ws连接服务器,发送了token,可是后端服务器日志,提示expectToken 为空 #138

Closed
xionglihong opened this issue May 23, 2024 · 2 comments

Comments

@xionglihong
Copy link

5a299d4034c29383152b3417f096a0c
94b5ad21f3cad80f48f5bd9b128bc6a
2640bb3072a54fda8055578e99cc326
我向服务器注册了一个用户,带token, 再在前端ws连接服务器,发送了token,可是后端服务器日志,提示expectToken 为空
24616567ad040f505eb9dbf0c57995b

@tangtaoit
Copy link
Contributor

device_flag不一致导致的,jssdk默认device_flag为1,看日志你通过接口调用传的device_flag为0,所以导致token错误。

解决方案:

调用 /user/token接口的时候device_flag传1

@xionglihong
Copy link
Author

收到 谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants