Tkey aggregate provider login: Unable to resolve enough promises

Hey guys, I set up the Tkey aggregate provider using Auth0.

I added the sub verifier of Auth0 google as per the tutorials and initialized by following the example repo. However, at the ‘connect’ function, it gives the error [Error: Unable to resolve enough promises.]. Appreciate help asap

``
const onLogin = async () => {
try {
const idToken = await loginWithAuth0();
const parsedToken = parseToken(idToken);

  await (tKey.serviceProvider as any).init(
    ethereumPrivateKeyProvider,
  );

  const verifierId = parsedToken.sub;
  const verifier = 'aggregate-test';
  const subVerifiers = [{ verifier: "auth0-google", idToken: idToken }]
  console.log("gothere")

  console.log("Params")
  console.log("verifier", verifier)
  console.log("verifierId", verifierId)
  console.log("idToken", idToken)
  console.log("subVerifiers", subVerifiers)

  const OAuthShareKey = await (
    tKey.serviceProvider as SfaServiceProvider
  ).connect({
    verifier,
    verifierId,
    idToken,
    subVerifierInfoArray: subVerifiers
  });

  await tKey.initialize();
  var { requiredShares } = tKey.getKeyDetails();
  console.log("requiredShares", requiredShares)




} catch (e) {
  console.log("Failed", e)
}

};

- SDK Version
"@tkey/core": "^12.0.0",
"@tkey/react-native-storage": "^11.0.0",
"@tkey/security-questions": "^12.0.0",
"@tkey/service-provider-sfa": "^11.0.0",
"@tkey/share-serialization": "^12.0.0",
"@tkey/share-transfer": "^12.0.0",
"@tkey/storage-layer-torus": "^12.0.0",
- Platform: React Native


import ThresholdKey from ‘@tkey/core’;
import SFAServiceProvider from ‘@tkey/service-provider-sfa’;
import TorusStorageLayer from ‘@tkey/storage-layer-torus’;
import { ShareSerializationModule } from ‘@tkey/share-serialization’;
import { ReactNativeStorageModule } from ‘@tkey/react-native-storage’;
import * as SecureStore from “expo-secure-store”;

const clientId =
‘REDACTED I put my key here’; // get from https://dashboard.web3auth.io

export const chainConfig = {
chainId: ‘0x1’,
rpcTarget: ‘https://rpc.ankr.com/eth’,
displayName: ‘mainnet’,
blockExplorer: ‘https://etherscan.io/’,
ticker: ‘ETH’,
tickerName: ‘Ethereum’,
};

const web3AuthOptions: any = {
clientId, // Get your Client ID from Web3Auth Dashboard
chainConfig,
web3AuthNetwork: ‘sapphire_mainnet’, // [“cyan”, “testnet”]
};

// Configuration of Service Provider
const serviceProvider = new SFAServiceProvider({ web3AuthOptions });

// Instantiation of Storage Layer
const storageLayer = new TorusStorageLayer({
hostUrl: ‘https://metadata.tor.us’,
});

// Configuration of Modules
const reactNativeStorage = new ReactNativeStorageModule(SecureStore);
const shareSerialization = new ShareSerializationModule();

// Instantiation of tKey
export const tKey = new ThresholdKey({
serviceProvider,
storageLayer,
modules: {
reactNativeStorage,
shareSerialization,
},
});

@pentatonictritones Welcome Aboard!

Sorry to hear you are facing issues.

Your issue has been forwarded to our Dev team and we will get back with further updates.

@pentatonictritones Please share your verifier and verifier ID as well .

Verifier: aggregate-test

Verifier Id: verifierId google-oauth2|115051867679753502132

Appreciate the help

hey, really appreciate any help you can give because we are blocked severely by this right now, let me know what I can do or what information i can give to expedite

Hi @pentatonictritones , can you try hitting following api and let me know the response and by any chance can you access network calls of your app, if yest will it be possible to share response of following endpoint, ‘https://sapphire-3.auth.network/sss/jrpc

curl  -X POST \
  'https://sapphire-3.auth.network/sss/jrpc' \
  --header 'Accept: */*' \
  --header 'User-Agent: Thunder Client (https://www.thunderclient.com)' \
  --header 'Content-Type: application/json' \
  --data-raw '
{
  "jsonrpc": "2.0",
  "method": "GetPubKeyOrKeyAssign",
  "params": {
     "verifier": "aggregate-test",
    "verifier_id": "google-oauth2|115051867679753502132"
  },
  "id": "20"
}'

Also can you please replace metadata url here with : ```
https://sapphire-1.auth.network/metadata

hi, do you mean like this:
// Instantiation of Storage Layer
const storageLayer = new TorusStorageLayer({
hostUrl: ‘https://sapphire-1.auth.network/metadata’,
});

Hey, from the app I get this

LOG {“id”: “20”, “jsonrpc”: “2.0”, “result”: {“is_new_key”: false, “keys”: [[Object]], “node_index”: “0”}}

This is what i used to call it

  async function callApi() {
    const url = 'https://sapphire-3.auth.network/sss/jrpc';
    const headers = {
      'Accept': '*/*',
      'User-Agent': 'Alluo (me@alluo.com)',
      'Content-Type': 'application/json'
    };
    const body = JSON.stringify({
      jsonrpc: "2.0",
      method: "GetPubKeyOrKeyAssign",
      params: {
        verifier: "aggregate-test",
        verifier_id: "google-oauth2|115051867679753502132"
      },
      id: "20"
    });

    try {
      const response = await fetch(url, {
        method: 'POST',
        headers: headers,
        body: body
      });

      const data = await response.json();
      return data;
    } catch (error) {
      console.error('Error calling API: ', error);
      throw error;
    }
  }

When I access the keys object, ( i dont know what is sensitive information but since this is just a test , it doesn’t matter )

[{“address”: “0xcDc3BEBf351a7163676D53565A3162801284F1C3”, “created_at”: “1705912151”, “key_index”: “5f30”, “nonce_data”: {“nonce”: “0b3ca35a1a754c96deec47d5aadeafa5e617105a69190c1627b1ad4867ee6233”, “pubNonce”: [Object], “upgraded”: false}, “pub_key_X”: “ccd4a04fbed514502d88bdf09d38ae0ed0fb965b5777e3bf3cf898b0c0349ef2”, “pub_key_Y”: “6be5501fc1b42c1a9d7a4bf24b47f798066e514290ce466fb9bbb985383ea2eb”}]

Hi, looking at response of above api it seems to be working for you, can you plz schedule a call here to help me debug the issue that you are facing as i am not able replicate it, it might be some config issue:-