MetaMask WalleConnect on Mobile exits after continue

When I try to authenticate from Safari on the iPhone using MetaMask with WalletConnect Iā€™m encountering an issue that after clicking on continue on the MetaMask app it exits before being able to also click on sign. This is what is happening:

  1. From Safari click on button to authenticate with walletconnect for MetaMask
  2. Phone opens MetaMask app and I click continue
  3. Phone goes back to Safari and then goes to appstore for MetaMask
  4. I need to manually go back to MetaMask app and click sign
  5. I need to manually go back to Safari

What I want is this:

  1. From Safari click on button to authenticate with walletconnect for MetaMask
  2. Phone opens MetaMask app and I click continue
  3. Staying at the MetaMask app click sign
  4. Phone goes back to Safari

This are the includes:

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/web3.min.js"></script><script src="https://unpkg.com/moralis/dist/moralis.js"></script>```

This is the code:

let user = Moralis.User.current();
if(!user){
  user = await Moralis.authenticate({provider: "walletconnect", signingMessage:"Test", 
                    mobileLinks: [
                      "metamask",
                    ]
                });
  await Moralis.enableWeb3({ provider: 'walletconnect' });
  window.localStorage.removeItem('walletconnect');
  window.localStorage.removeItem(
              'WALLETCONNECT_DEEPLINK_CHOICE'
            );
}
1 Like