[SOLVED] isAuthenticated with custom connector

I’m using a custom connector and I’ve this:
const { isAuthenticated } = useMoralis();

but when the login is done the only way to see the account connected is refreshing the page, the console.log of isAuthenticated is always false.

Is there a way I can retrieve the information similar to isAuthenticated in another way to close the login modal and refresh the page with the account connected?

Thanks

Hi @gerar

The value of isAuthenticated will be set to true as soon as the authentication is successful. Could you share the code for how you are using isAuthenticated value to check the user authentication?

Hello, I found out that the issue was because I was using Moralis.authenticate.

As soon as I used const { authenticate, isAuthenticated } = useMoralis();

await authenticate({ signingMessage: message, connector: WalletConnectWeb3Connector }); this specific issue was solved.

I’m now stuck on another issue that I will post separately.

Thanks

1 Like