Web3Auth/web3auth-react-native-sdk

Issue with init function

Closed this issue · 1 comments

After calling the init function and the api the decrypted message returns wrong privKeys.
If I call the login functions instead of init the returned privKeys are correct.
Provider used jwt

result from init
privKey: "0b1d198787e4391eb5af9eed005aff10812......."

result from login
privKey: "b1d198787e4391eb5af9eed005aff10812......."

both keys are the same expect the trailing comma as a result the ed25519PrivKey are totaly different

const redirectUrl = `${scheme}://openlogin`;

  const web3Auth = new Web3Auth(WebBrowser, EncryptedStorage, {
    clientId,
    network,
    loginConfig: {
      jwt: {
        verifier,
        typeOfLogin: 'jwt',
        clientId,
      },
    },
  });

  const state = await web3Auth.init()

  if (state) {
    self.webAuthState = state
  } else {
    self.webAuthState = await web3Auth.login({
      loginProvider: LOGIN_PROVIDER.JWT,
      redirectUrl,
      dappShare,
      mfaLevel: 'mandatory',
      sessionTime,
      extraLoginOptions: {
        id_token: await self.authProvider.getIdToken(),
        verifierIdField: 'sub',
      },
    });
  }

Please upgrade to v4