Use the hook useSignOut to sign out the user.
useSignOut
import { useSignOut, useAuthenticated } from '@nhost/react' const Component = () => { const { signOut } = useSignOut() const isAuthenticated = useAuthenticated() if (isAuthenticated) { return <button onClick={() => signOut()}>Sign Out</button> } return <div>Not authenticated</div> }
stateAll required boolean
boolean