Is authentication without automatically adding a User possible?

Hi,
Iā€™m building a dApp where I need user/holders to ā€œsign inā€ with their wallet, followed by a check on certain assets and transactions to then give them access to the rest of the site. I already have the data to check them against from contract syncs.

So I have authentication all set up for the wallets I need all working. But is there any way to prevent Moralis from automatically adding the address to the Users table until I want it to be added?

Or is the only way to do this by signing them in independently from Moralis, then adding them with a watchAddress?

Cheers!

you can disable user sync in server settings, and only use watchAddress later when you want

1 Like

Ah hah!! Thank you!

View Details > EVM Configuration > User Activity Sync.

Iā€™ve been looking for a parameter to pass to the authenticate method itself :slight_smile:

Just to update: this wasnā€™t quite what I was after, since disabling the User Sync doesnā€™t actually stop the authenticated user details automatically being added to the _User table. (Though, with en empty accounts field.)

I guess Iā€™ll just have to live with that and use an additional column to flag the pre-requisites Iā€™m checking for. :slight_smile:

Cheers!

you could skip authentication if you donā€™t need it, and use only Moralis.enableWeb3()

I see.

Well I need ā€˜authenticationā€™ in that I need a verified wallet address to start the process of checking for assets and transactions before making them an ā€˜actualā€™ User.

I also need to support MetaMask (desktop and mobile) as well as WalletConnect wallets and my custom Coinbase Wallet connector, which I donā€™t seem to be able to do without using the authenticate() method.

This is why I thought it would be useful to have something like skipAddUser:true (or similar) that could be added to the authentication method used for the various wallet types. :slight_smile: