Using a Custom JWT Auth Provider to get an Ethereum Private Key

Good evening!

I am using Web3Auth and my own backend to generate JWTs to use with a custom verifier. So far, I successfully make it through login, with the popup modal disappearing and connectTo returning a provider, the issue is the final step: getting the private key from the provider.

The following is my code:

This works great until the final three lines, where the request throws this console error:
image

I thought it might be an issue of not specifying a custom RPC but, still, no luck. I used CHAIN_NAMESPACES.OTHER to see if perhaps it was an EVM-specific issue, but then I got this error:

image



Originally posted by: Animalmix55

Check the discussion at: https://github.com/orgs/Web3Auth/discussions/967

Well, I'll be darned, I was using eth_privateKey instead of eth_private_key. I wonder where I got that idea from!



Originally posted by: Animalmix55

I did some further drilling into the RPC error and discovered this:
image

Which seems to contradict https://web3auth.io/docs/sdk/web/providers/#examples



Originally posted by: Animalmix55