You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using @web3modal/ethers and siwe packages to implement a security feature to connect a client's wallet as a separate 2FA factor. One of the requirements is that during login to my website, I need to grab the user's connected wallet info from web3modal and send a sign-in request to the wallet to complete the login procedure.
I can successfully connect the wallet and fetch the necessary data from web3modal as long as a client stays in the same browser where they connected their wallet.
The issue begins when a user is trying to open my website in:
incognito mode
a different browser/laptop/mobile
or clear the browser's storage/cookies/indexDB (WalletConnect seems to store a lot of data in the browser)
In those scenarios, I can no longer receive the connected wallet and the wallet provider metadata - web3modal does not send anything back.
The way I fetch the wallet is Web3Modal.getWalletInfo and Web3Modal.subscribeWalletInfo while for getting wallet provider metadata I use Web3Modal.getWalletProvider.
My question is - is it the expected behavior and is there a possibility to fetch the connected wallet on any device/browser a client is accessing my website?
I suspect it is made by design so I wonder if someone had to do something similar and what might be the workaround.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am using
@web3modal/ethers
andsiwe
packages to implement a security feature to connect a client's wallet as a separate 2FA factor. One of the requirements is that during login to my website, I need to grab the user's connected wallet info fromweb3modal
and send a sign-in request to the wallet to complete the login procedure.I can successfully connect the wallet and fetch the necessary data from
web3modal
as long as a client stays in the same browser where they connected their wallet.The issue begins when a user is trying to open my website in:
In those scenarios, I can no longer receive the connected wallet and the wallet provider metadata - web3modal does not send anything back.
The way I fetch the wallet is
Web3Modal.getWalletInfo
andWeb3Modal.subscribeWalletInfo
while for getting wallet provider metadata I useWeb3Modal.getWalletProvider
.Note that I can reproduce it in the Web3 labs example https://lab.web3modal.com/library/ethers/
My question is - is it the expected behavior and is there a possibility to fetch the connected wallet on any device/browser a client is accessing my website?
I suspect it is made by design so I wonder if someone had to do something similar and what might be the workaround.
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions