How to turn off sign when authenticate with moralis

Hi, when I login some dapp like pancake, I donā€™t have to sign like moralis. So in moralis, how to turn of sign when authenticate?

1 Like

Hey @locpx

Please take a look at Why do you use the signing messages and other Dapps donā€™t?

So can I turn off signing messages?

No, you can not. There is info in the docs:

If you do not need users to be stored in the database, you can use enableWeb3() and get eth_address of users using default web3 methods.

So instead of Moralis.authenticate() you can use const web3 = await Moralis.enableWeb3(). The second one will give you a web3 object you can work with

Ok I got it. thank you.

1 Like

Happy BUIDLing :man_mechanic:

Hello,

@Yomoo I think it might be worthy to evaluate why Moralis do this in mobile apps using react native, this is just an opinion but itā€™s weird cause there is already one validation message and then you get a second message so you have to be in your dapp go to your wallet then go again to your dapp and go one more time to your wallet and finally go back and login properly, compared with OpenSea where you go from your dapp to your wallet once and then when yo go back to your dapp thatā€™s all, the experience is better

does opensea also has authentication? or only connects the wallet?

@cryptokid I guess only connects the wallet? it has the exact same message that Moralis have the first time and thatā€™s all, no second message, but if the second message is related to the fact that Moralis save some data in the database or something like that, I believe that this message is not clear for a user, we (the developers) could add something like " when you log in you accept the following conditions" and then add a link that opens a pop up explaining what is happening that from my perspective would be a better user experience cause you donā€™t need to so many back and forth between the Dapp and the wallet app, unless, that there is a reason related to wallet connect that force us to do in this way, is that the case nevermind :slight_smile: Iā€™m just trying to figure out if we have options to improve the experience

you can configure the message that is displayed to user in metamask

I know that we can change the message using ā€œsigningMessageā€ property, but that is still giving the back and forth experience from the dapp to the wallet twice, I just feel that is not the best experience. As a user I would expect that when I click accept in my wallet and then I go back to the dapp is gonna login automatically instead of sending me again to the wallet, also, Iā€™m not sure if this is an issue with WalletConnect or Metamask but occasionally the second time the signing message doesnā€™t appear, I have two close the two apps and try again.

Hi @josemmt

The Metamask connection should work as expected: first connecting a wallet+signing message.

There may be some problems when you use WalletConenct, the authentication may not work correctly on localhost.

There is all needed info How to turn off sign when authenticate with moralis

I guess we can make the functionality easier web3 enabling without connecting to the database

Hi @Yomoo

thanks for your reply, I think that having that as an option would be good, also, this is specific from react native (Iā€™m mentioning cause is related to your suggested solution) but enableWeb3 doesnā€™t seem to be working there, I have tested this in a web app and in a mobile app, no problems in the web but in the mobile app using react native boilerplate isWeb3enabled is always false, I added the details here

In addition to that, I can confirm that using a Testnet (I havenā€™t tried a Mainnet) has issues occasionally (most of the time works well) to authenticate using wallet connect.

For the moment I keep using Authenticate method as it is, but I think we could improve it, not only the Moralis Team but also the developers using your awesome tools :slight_smile:

Thanks, Jose