The token checking logic is wrong, as commented code in the image above.
When I calling login() method, it always throw "Invalid token" exception. After a few days, I found this error message in the code, and found the condition, token[3:APP_ID_LENGTH+3] is NOT appId, as we can clearly tell with the naked eyes ...
package: agora-rtm-miniapp version: 1.1.1
The token checking logic is wrong, as commented code in the image above.
When I calling login() method, it always throw "Invalid token" exception. After a few days, I found this error message in the code, and found the condition,
token[3:APP_ID_LENGTH+3]
is NOTappId
, as we can clearly tell with the naked eyes ...