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: