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:
- From Safari click on button to authenticate with walletconnect for MetaMask
- Phone opens MetaMask app and I click continue
- Phone goes back to Safari and then goes to appstore for MetaMask
- I need to manually go back to MetaMask app and click sign
- I need to manually go back to Safari
What I want is this:
- From Safari click on button to authenticate with walletconnect for MetaMask
- Phone opens MetaMask app and I click continue
- Staying at the MetaMask app click sign
- Phone goes back to Safari
This are the includes:
<script src="https://cdn.jsdelivr.net/npm/web3@latest/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'
);
}