Check which provider was used during Auth

So my basic problem for the past few days has been that I have 2 auth methods on login of my site.
Metamask and WalletConnect.

now I have to auth according to both to what ever the user selected. Now when we parse through the website. I have to enable web3 when im using the contracts. So my biggest issue is to get what user used to auth. Was it metamsak or was it WalletConnect.

Now I know there a function to see if Metamask is installed or not. But if A user has metamask as extension and then used wallet connect through QR code that would be troublesomeโ€ฆ Any solutions?

Hi @ZainHasan

You can get this info using via: Moralis.Web3.activeWeb3Provider.type

2 Likes

wao Thanks man. love you

But it will work only if you activated web3/autneticated recently. Also take a look at Send transactions web3 provider WalletConnect . Probably you need to use localstorage

1 Like