object helper methods using react-moralis

Viewed 146

How do I log out of a wallet using Moralis?

This allowed me to log in:

<button className="button-connect" 
                        onClick={() => enableWeb3({provider: 'Current Provider'})} 
                        disabled={isWeb3EnableLoading}>
                        Connect Wallet
                    </button>
1 Answers

useMoralis hook seems to be coming with the logout function:

const LogoutButton = () => {
  const { logout, isAuthenticating } = useMoralis();

  <button onClick={() => logout()} disabled={isAuthenticating}>
    Authenticate
  </button>;
};

https://www.npmjs.com/package/react-moralis#logout

Related