[SOLVED] Does MagicLink integration works with Polygon

Hi,

I got this to sort of work but I am wondering does this :

Work with Polygon Maine and Mumbai?
It seems like MagicLink implemented Polygon on their end and you need to provide this
to network

const customNodeOptions = {
rpcUrl: โ€˜https://rpc-mumbai.maticvigil.com/โ€™, // Polygon RPC URL
chainId: 80001, // Polygon chain id
}

??

at the moment our magic link only works with ethereum mainnet and some testnet :raised_hands:

more questions about Magic Link you can ask @RayRay

2 Likes

Hey, for now, itโ€™s only Ethereum as the eth login returns a valid provider.
I can look into customNodeOptions for you and see if we can integrate it. :raised_hands:

1 Like

That would be awesome! This login path is really powerful to onboard new users and my application is geared toward less-crypto friendly community.

1 Like

I am guessing web3Auth also does not work with Polygon? I could not get it to work with chainId: 80001

@RayRay it looks like Web3Auth almost work with Polygon Mumbai which is encouraging!

It does create a proper wallet associated with the email and I was able to send test money to it. Otherwise when I try to use the wallet through Moralis.executeFunction API I get the following:

 Error: Error: {
  "code": -32603,
  "message": "Internal JSON-RPC error.",
  "data": {
    "code": -32000,
    "message": "transaction underpriced"
  },
  "stack": "EthereumRpcError@http://localhost:3000/static/js/0.chunk.js:6424:5\ngetEthJsonRpcError@http://localhost:3000/static/js/0.chunk.js:6766:10\ninternal@http://localhost:3000/static/js/0.chunk.js:6652:40\nparseResponse@http://localhost:3000/static/js/0.chunk.js:1334:72\n./node_modules/@toruslabs/base-controllers/dist/baseControllers.esm.js/</createFetchMiddleware/<@http://localhost:3000/static/js/0.chunk.js:1407:37\n"
}

Are there any reasons for this?
My exact same code works with Desktop Metamask as well as through WalletConnect.

Also the whole process of connecting through Web3Auth feels a bit fragile:
It does not work every time.
It opens 2-3 windows and some time hangs.
The login form is a bit unresponsive at time.
Light mode (as opposed to dark mode) could use more tests of the CSS probably.
It feels a bit alpha/beta release to share with the most inexperienced user at the moment.

I am excited for this to work well as this might be the door to mass adoption.

Hey sorry man completely missed this, yes you are right this web3auth is gimmicky. Do you have test cases that you can provide where things break. Iโ€™ll look into it and resolve them as fast as I can.

And yep, this is the step to mass adoption one click on-boarding!!!

Is support for Polygon added now?

maybe this tutorial helps

I donโ€™t know if it works with polygon now

In the tutorial given by cryptokid,

wagmi-magic-connector library there is an option to configure magicSdkConfiguration to set the network to polygon :raised_hands:

For further config, try check their documentation deeper.

Iโ€™ll be closing this thread as it is quite old and would be better that new questions are addressed in new thread instead