Electron SDK Demo App Authorization Not Works. Auth Unknown error[ZoomAuthResult.AUTHRET_UNKNOWN]

Description

Which version?
Latest

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

  1. Run the demo app.
  2. Enter token.
  3. Click the SDKAuth button.
  4. See the error at the console output.

Screenshots

Additional context
Add any other context about the problem here.

I’ve add a line to show the sdkauthCB status as:

line 52: function sdkauthCB(status) {
line 53: console.log("sdkauthCB status: ", status);
line 54: if (ZoomAuthResult.AUTHRET_SUCCESS == status) {

Hi @yuyo217,

Thanks for the post. Could you post a sample of your JWT payload?

Thanks!

JWT Token:
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOm51bGwsImlzcyI6IlZsR3pIR1ZnU2ltV0NPaVN2dDJaSVEiLCJleHAiOjE2MDMzNTQ4NTAsImlhdCI6MTYwMjc1MDA1MH0.00LHri-_-IEtlL3zN27uDfXe2KPwzVa9chsP-cEGh40

The token will be expired at 16:20 10/22/2020

Hi @yuyo217,

Thanks for providing the token. The exp cannot be more than 2 days after iat, you may leverage the python script here to generate your JWT token:

    iat = long(int(time.time()))
    exp = long((datetime.datetime.today() + datetime.timedelta(days=2)).strftime("%s"))
    tokenExp = long((datetime.datetime.today() + datetime.timedelta(hours=1)).strftime("%s"))

    payload = {
        'appKey': key,
        'iat': iat,
        'exp': exp,
        'tokenExp': tokenExp
    }
    encoded = jwt.encode(payload, secret, algorithm='HS256')

Thanks!

1 Like