cancel
Showing results for 
Search instead for 
Did you mean: 

Finding dificulties in react-native-zoom-us

vijay1998
Newcomer
Newcomer

When i try to integrate the key and secret ID then it returns a jwt token but when I try to verify the token using SDK it shows an error that is not easily understandable by us it is showing ERR [Error: Error= 5 (unknown), internalErrorCode=124] error code it's because of the initialization 

const KJUR = require("jsrsasign");

function generateSignature(key, secret, meetingNumber, role) {
  const iat = Math.round(new Date().getTime() / 1000) - 30;
  const exp = iat + 60 * 60 * 2;
  const oHeader = { alg: "HS256", typ: "JWT" };

  const oPayload = {
    sdkKey: "....GQ",
    appKey: "....OO",
    mn: 00.....,
    role: role,
    iat: iat,
    exp: exp,
    tokenExp: exp,
  };

  const sHeader = JSON.stringify(oHeader);
  const sPayload = JSON.stringify(oPayload);
  const sdkJWT = KJUR.jws.JWS.sign("HS256", sHeader, sPayload, secret);
  return sdkJWT;
}

console.log(
  generateSignature(
    "......vw",
    ".......E",
    ....0000,
    0
  )
);
This code is for generating a token and it is giving response but the sdk is giving error kindly resolve this issue.
0 REPLIES 0