Metamask doesn't open when using auth core on mobile browser

Hi everyone,

Currently having an issue with using @web3auth/core and Metamask. It works fine on desktop browsers, but it fails to redirect to the Metamask app when attempting to authenticate on a mobile browser (eg IOS Safari).

I've got a pretty basic setup with a metamask adapter configured:

const metamaskAdapter = new MetamaskAdapter({})

web3auth.configureAdapter(metamaskAdapter)

and then connecting with auth.connectTo('metamask')

As I say, this works great on desktop browsers. On mobile, i'd expect metamask to open, ask to connect to the site, and then redirect to the site. However, nothing happens when running 'connectTo'. Social logins work fine, just not Metamask.

Looking at console logs from the mobile browser, it looks like it's not detecting any injected window.ethereum and, as a result, the adapter is not becoming 'ready' to run. Is there a way to get the expected redirect to metamask -> connect -> return to site functionality working?

Thanks!

Screenshot 2022-10-26 at 11 11 13

Screenshot 2022-10-26 at 11 11 21



Originally posted by: whpoole

Check the discussion at: https://github.com/orgs/Web3Auth/discussions/776

Hey there, that error occurs due to there not being any metamask extension installed on the browser. And if I'm not mistaken there is currently no metamask extension for Safari https://metamask.io/download/

EDIT: Answer in comment below



Originally posted by: BboyStatix