if (isAuthenticated) {
console.log('isAuthenticated' , isAuthenticated)
logout().then(() => console.log(`then is isAuthenticated :::` , isAuthenticated))
}
const {logout : moralisLogOut , isInitialized , isAuthenticated , deactivateWeb3 , hasAuthError , isAuthUndefined} = useMoralis();
useEffect(() => {
(async() => {
console.log(`isAuthenticated :: ` , isAuthenticated)
if (isInitialized && isAuthenticated) {
await moralisLogOut()
.then(() => {
console.log(`Callback isAuthenticated :: ` , isAuthenticated)
})
.catch(e => {
console.log(`Catch the Error ::` , e.message)
})
}
})()
},[isInitialized])
Hello, I am using react moralis web3auth (SNS Login) I want to make sure that I always log in again when I leave the page and come back in So, even though I used the logout function like the code above, I donβt log in again, but I log in with the account I logged in with. The isAuthenticated recorded with Callback is still true.