Demo keeps refreshing at auth page

Description
I’m trying to get the demo to go to the login screen, but when I’m on the auth screen and enter the token, the page keeps refreshing. I am following the correct JWT generation instructions from Jwt error 5 returned from AuthWithJwtToken and my AuthWithJWTToken is returning 0 as expected (although I’m not sure where to get the access token issue and expiration timestamps, so I have put down arbitrary timestamps), but the demo app keeps refreshing to the auth screen every time I hit “SDKAuth”

Here’s what my payload looks like:
{
“appKey”: “sdkkeyhere”,
“iat”: 1595304469,
“exp”: 1595364469,
“tokenExp”: 1595364469
}

I’ve logged the status inside of the function sdkauthCB and it’s returning 5, which is unknown. Is there something I’m doing wrong?

Which version?
v5.0.24433.0616

To Reproduce(If applicable)
Steps to reproduce the behavior:

  1. “npm install” inside the demo directory
  2. “sh build_nodeaddon_mac.sh” to rebuild the Zoom SDK
  3. “sh run_demo_mac.sh” to start the demo
  4. Hit “Start Demo”
  5. Paste in the JWT from jwt.io
  6. Hit “SDKAuth”
  7. Observe the app refreshing

Hi @peterlzhou,

Thanks for using Zoom SDK. The error code 5 means the JWT token has some issues. Based on the JWT token provided, it seems like the timestamps for 3 fields are the same. The exp must be larger than iat, otherwise it will expire when the token is issued. The tokenExp field need to be a timestamp of at least iat + 30 minutes. You may find more information here: https://github.com/zoom/zoom-sdk-electron/blob/master/CHANGELOG.md#new-sdk-initialization-method-using-jwt-token

Thanks!

It will help you. you can generate JWT token by following this method
https://devforum.zoom.us/t/electron-sdk-error-in-function-sdkauthcb-status-5/24816/4

1 Like

@navin.prakash Thanks for sharing this.