Does MagicLink integration works with Polygon

Hi,

I got this to sort of work but I am wondering does this :
https://docs.moralis.io/moralis-server/users/crypto-login/magic

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": "[email protected]://localhost:3000/static/js/0.chunk.js:6424:5\[email protected]://localhost:3000/static/js/0.chunk.js:6766:10\[email protected]://localhost:3000/static/js/0.chunk.js:6652:40\[email protected]://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!!!