afarley
February 20, 2024, 9:41pm
1
SDK Version: 7.3.2
Platform: web - no-modal
By passing the loginParams using web3auth-wagmi-connector:
// @ts-ignore
web3AuthConnector.loginParams = loginParams;
web3AuthConnector.options.loginParams = loginParams;
connect({
connector: web3AuthConnector,
});
By calling web3Auth directly, the metamask window opens and it seems to work but the connector state is not updated.
await web3Auth.init();
await web3Auth.connectTo(WALLET_ADAPTERS.METAMASK);
By following the source code on this line , connecting to adapters other than OpenLogin using web3auth-wagmi-connector is not allowed using the no-modal SDK.
vjgee
February 20, 2024, 11:39pm
2
@afarley Thanks for your recent post.
Your request has been forwarded to our Dev team and we will get back with further updates.
Hi @afarley ,
I understand. Can you please tell me if you see the logged in view upon refreshing the page?
vjgee
February 26, 2024, 6:23am
4
@afarley Can you respond to the previous message?
afarley
February 26, 2024, 4:14pm
5
Are we talking about the same thread here? The “Something went wrong” popup appears before the Metamask plugin can open, so there is no way to login using that method, and refreshing the page has no incidence on that.
TomTom
February 27, 2024, 2:18pm
7
hi @afarley ,
Have you checked out our example pnp no-modal wagmi example?
Also we updated, 5 days ago, our library @web3auth/web3auth-wagmi-connector
Please check the package.json
. It would be great if you could update the libraries as well.
(if not, please contact me with more information about which web3auth-wagmi-connector are you usign)
"@web3auth/base": "^8.0.0",
"@web3auth/ethereum-provider": "^8.0.1",
"@web3auth/no-modal": "^8.0.1",
"@web3auth/openlogin-adapter": "^8.0.1",
"@web3auth/wallet-services-plugin": "^8.0.1",
"@web3auth/web3auth-wagmi-connector": "^6.0.0",
afarley
February 27, 2024, 5:15pm
8
I’ve checked the examples.
Updating would be last resort because we are still on wagmi 1.x and web3auth-wagmi-connector 6.0.0 requires 2.x
We are currently using version 5.0.1 of the connector.
I’ve updated to wagmi 2.x and web3auth v8, still getting an error trying to connect to Metamask using the NoModal SDK.
If we follow the logic on this line , only openlogin connectors are allowed.
Basically our use case is the following:
We were using the Modal SDK and switching to the NoModal SDK.
We are using web3Auth.authenticateUser();
We are verifying the signature on our backend.
All of this was possible to do with Metamask using the Modal SDK.
Is it possible to do using the NoModal SDK?
TomTom
March 6, 2024, 12:55pm
10
Yes, It’s possible as the userInfo you get on authenticateUser is a similar type of object in both modal and no modal.
Please contact me if you have any other question.
TomTom
March 6, 2024, 1:29pm
11
The topic will be continued in this thread:
@vjgee
My question specifically refers to using web3auth-wagmi-connector with the NoModal SDK to connect to multiple providers dynamically.
Is using these two packages together supported?
Also, for email specifically: the email address is inherently dynamic. How to pass it after initializing the connector such that:
Web3AuthConnector({
web3AuthInstance,
// Cannot pass this directly at initialization, need to pass it later when user entered email address
loginParams: {
…