rairprotocol / rair-dapp

Source code for RAIRprotocol ecosystem
https://rairprotocol.org
Apache License 2.0
1.43k stars 888 forks source link

No org ID provided from AlchemySignerWebClient #278

Open RAIReth opened 1 week ago

RAIReth commented 1 week ago

The way our system works we need to support multiple blockchains and be able to switch between them, for this the v3 way of doing the connection with Alchemy was connecting the Web3Auth signer and then connecting to the Modular accounts from account kit

Our ideal implementation would be to replace the Web3Auth signer with the Alchemy signer.

Following the documentation we are trying to use the account-kit/infra instead of the react integration and hooks to connect.

I create the alchemy web signer and try to prepare the popup.

   const signer = new AlchemyWebSigner({
      client: {
        connection: {
          apiKey: chainData.alchemyAppKey
        },
        iframeConfig: {
          iframeContainerId: 'alchemy-signer-iframe-container'
        }
      }
    });
signer.preparePopupOauth();

But I get the error “No org ID provided” from AlchemySignerWebClient

Once that gets resolved I'd plan to authenticate with a light account or modular account, but this block of code never gets to execute because of the error from the websigner.

`signer.authenticate({
      type: 'oauth',
      authProviderId: 'google',
      mode: 'popup'
    });

    const client = createAlchemySmartAccountClient({
      transport: alchemyTransport,
      policyId: chainData.alchemyGasPolicy,
      chain: chainData.viem,
      account: await createLightAccount({
        chain: chainData.viem,
        transport: alchemyTransport,
        signer
      })
    });`