Moralis connects to wallet but still doesn't authenticate

So I’m trying to authenticate the user using Sequence wallet via Wallet connect.
I am using web3uikit’s ConnectButton to help me use WalletConnect to connect to Sequence wallet.

This is my index.js file (the necessary imports have been made)

                    <App />

And in my app.js file

function App(){
const { isAuthenticated, Moralis, user, authenticate } =

    useEffect(() => {
        const isAuth = () =>
                ? authenticate({ provider: "walletconnect" })
                      .then((user) => log(user))
                      .catch((e) => log(e))
                : null;
        isInitialized && isAuth();
    }, [isInitialized, isAuthenticated]);

 return (
            {log("isAuthenticated", isAuthenticated)}
            {isAuthenticated ? (
                // redirect to user dashboard
            ) : (
                    <h1>Please connect wallet to continue</h1>
                    <ConnectButton moralisAuth={false} />

I have used the same approach before but with Metamask, and it seems to turn isAuthenticated to true after signing in.
But now the issue is that even if I login, the web3uikit’s ConnectButton displays my account name and money, but it still keeps isAuthenticated to false

In order to use env variables in react, You must create custom environment variables beginning with REACT_APP_. You can read more here
You should have such in your .env file


So you can have


Ok so I tried a few more things

I simply hardcoded the values, and then when I call authenticate it works with Metamask

But when I call authenticate({ provider: "walletconnect" }), it stores all the account info in the browser’s local storage, but it won’t update isAuthenticated to true

Using wallet connect, you need to sign the message in order to update isAuthenticated. And make sure you have @walletconnect/web3-provider installed to use wallectconnect properly.