Does Web3Auth support layer 2 network - Scroll?

I have tried to run the EVM demo: https://evm-modal-example.vercel.app/

and I’m using Scroll Sepolia network: Setup | Scroll Documentation

but when I tried to click the Get Private Key it just return me this error:

and the balance is not returning how much Scroll Sepolia I have either.

Hi ENDER BOY,

Thanks for reaching out! It looks like you’re running into issues with the Web3Auth PnP Web SDK on the Scroll Sepolia network.

To help us diagnose the issue better, could you share:

  1. The Web3Auth initialization and login code snippets.
  2. Any browser console screenshots you might have that show the errors in detail.

This will help our team understand what’s going wrong and assist you more effectively.

This response was generated by the Web3Auth Bot and a member of our team will review and provide a more detailed answer shortly.

Hi, I’m just trying out the demo given by the docs

Hey @leeweixuan39,

The demo you tried is using a feature that allows a developer to disable the export of the private key. And yes, we do support Scroll.

Please check again, I have disabled that flag.

Hi, thanks for the reply.

Unfortunately, when I tried again to get the private key, I’m getting the same error, although I have manually connected my network to Scroll Sepolia Network.

Please share your code

Hi, as mentioned above I’m just only trying out the EVM demo example in this page: : https://evm-modal-example.vercel.app/

But I did tried to clone the repo, and this is my getPrivateKey function where I did not change any code within it:
const getPrivateKey = async () => {
if (!provider) {
uiConsole(“provider not initialized yet”);
return;
}
const rpc = new RPC(provider as IProvider);
const privateKey = await rpc.getPrivateKey();
uiConsole(privateKey);
};

const uiConsole = (…args: any[]): void => {
const el = document.querySelector(“#console>p”);
if (el) {
el.innerHTML = JSON.stringify(args || {}, null, 2);
}
};

And what does this code look like? same as the code provided?

Are you using your clientID in this project? or one provided in the example?

Yes, it’s the same code as provided.

I have tried both using my own client ID (web3auth) and the clientID that is provided in the example.

I’m using walletconnect v2 project id.

any updates on this?

Please share your chainConfig that you’ve passed as a parameter to the constructor?