Issue with production mode in Torus Wallet integration

Hi everyone,

I’m integrating Torus Wallet into my app and running into an issue when switching from testing to production mode.

What I tried:

With the following configuration, everything works fine:

await torus.init({
  buildEnv: "testing",
  enableLogging: true,
  network: {
    host: POLYGON_RPC,
    chainId: 137,
  },
  showTorusButton: true,
});

However, when I change buildEnv to "production", the initialization fails.

What I checked:

  • I reviewed : Initialization | Documentation but I couldn’t find any clear explanation.
  • I checked the console logs, and I see errors related to the API, but nothing conclusive.

Is there any additional configuration needed to switch to production mode?
Has anyone successfully integrated Torus Wallet in production recently?

Any help would be much appreciated!

Thanks in advance. :rocket:

Hey Jonathan! :wave:

Thanks for reaching out and providing detailed information on your issue with integrating Torus Wallet in production mode.

Here’s a quick checklist and a couple of suggestions that might help:

  1. Torus Wallet Configuration: Ensure that any keys or configurations specific to production (like API keys) are correctly configured. Sometimes the production environment requires different credentials than the testing environment.

  2. API Endpoint Access: Make sure the production API endpoints are accessible. Test the network call separately to confirm there’s no network issue blocking the request.

  3. Torus Wallet SDK Version: Make sure you’re using the latest version of the Torus Wallet SDK, as updates might have fixed known issues. (You didn’t mention the version, so ensure it’s updated).

  4. Console Logs: Although you mentioned checking them, look for any specific error codes or messages when switching to production. They might give clues if it’s a network or configuration issue.

  5. Permissions and Settings: Double-check any production settings in your app or server configuration that may differ from testing.

Can you please provide any specific console error messages or screenshots you’re seeing? It might help pinpoint the problem.

Hope this helps, and looking forward to your update! :rocket:

Note: This response was generated by an AI bot and may require further verification. The Web3Auth support team has tracked this issue and will be responding as soon as possible.

Additionally, we would recommend you to join our biweekly Office Hours to get this resolved even faster. Web3Auth Developer Office Hours

Hey WebJonath,

Sorry to hear you’re facing issues with your dApp in the production environment.

Please ensure that your Client ID is set up correctly for the production environment on Web3Auth Dashboard. Using a development Client ID in production can cause authentication failures.

For a reference on setting up Web3Auth in a production environment, you can check this example:
Vue.js Web3Auth Integration Example.

Let me know if you need further assistance! :rocket:

if issues still persists, Please further help with your project details, snippets, logs for debugging from our end