Custom Login with walletlink for coinbase wallet

I need to be able to provide coinbase mobile wallet access to my project. Coinbase mobile wallet uses walletlink instead of walletconnect.

I have seen in the documentation under the login section
https://docs.moralis.io/moralis-server/users/crypto-login

That i can add a custom wallet login by creating a custom web3 provider and enable function that is passed to the Moralis library. And Creating the web3 provider with walletlink is simple.
I just wanted to ask for some quick feedback if this will actually work with walletlink, as it is a bit different to linking directly with a wallet.

1 Like

yes it should be simple, just add a custom enable web3 function that returns the wallet link object and then Moralis.authenticate and it will have the walletlink modal to connect to coinbase wallet~

Awesome thanks, I will try that asap

1 Like

Did you try it?
I try the code below didn’t work.

 const enableWalletLinkWeb3 = () => {
    const walletLink = new WalletLink({
      appName: 'app',
      appLogoUrl: 'app-url',
      darkMode: false,
    })
    const walletLinkProvider = walletLink.makeWeb3Provider(
      'https://api.avax.network/ext/bc/C/rpc',
      43114,
    )
    const activate = async () => {
      await walletLinkProvider.enable()
      return {
        provider: walletLinkProvider as unknown as providers.ExternalProvider,
      }
    }
    enableWeb3({
      connector: {
        type: 'walletlink',
        network: '0xa86a',
        account: null,
        chainId: null,
        activate,
        deactivate: async () => {
          walletLinkProvider.disconnect()
        },
      },
    })
  }

not yet, but I will in the next couple days and circle back here

Did this worked? I’m trying to create the custom Walletlink for Coinbase also but don’t know how to implemented correctly in Vanilla JS. Any ideas?

1 Like

Did anyone ever figure this out ???