isAuthenticated returns true everytime even though the user didnāt sign the moralis authentication
what is the context? sometimes the user is still authenticated if he authenticated before and the session was saved in current browser
if i create new account also and use that account, it still returns true even when I never authenticated moralis.
Even with different accounts, i get the same _User object
info: Ran cloud function getPluginSpecs for user gtHTTC57LN with:
Input: {}
Result: [] {āfunctionNameā:āgetPluginSpecsā,āparamsā:{},āuserā:āgtHTTC57LNā}
info: Ran cloud function getPluginSpecs for user gtHTTC57LN with:
Input: {}
Result: [] {āfunctionNameā:āgetPluginSpecsā,āparamsā:{},āuserā:āgtHTTC57LNā}
is this for a self hosted server, for a moralis server?
it is for a self hosted server
can you try to logout current user?
did that. now its showing invalid session token
where you get that invalid session token error? for what function?
for authentication. I am getting that in both parse-server as well as frontend
Invalid session token {ācodeā:209,āstackā:āError: Invalid session token\n at Object.getAuthForSessionToken (D:\Xeggo\Moralis\node_modules\parse-server\src\Auth.js:100:11)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)ā}
it was working fine yesterday but dont know why and how its not working
I removed the data from localstorage and was able to sign, the problem is still the same now, when switching accounts, it doesnt ask for signing and returns isAuthenticated as true
How do you switch accounts?
from metamask, connect a different account to the app
I am also getting chainId must be a valid enum value if I use a celo network ( chaindId value is 44787) and this used to work earlier in moralis servers
You can hardcode the chain id 1 for that authentication, it doesnāt matter now.
Changing the account in MetaMask is not enough to authenticate a new user, the authentication is different and you have to call it explicitly. And it will create a session token on authentication. It is not the same thing as the account that is in MetaMask.
so suppose I change my metamask account from 1 to 2, I signed the auth msg from account 1 and it is stored in db with acc1 address, so after changing to account 2, how can I sign it again so that a new user is stored with acc2 address?
earlier on moralis servers, I used to change the accounts, and i got an auth popup everytime with a new account
you have to write a code to open that pop up
when the account changes in metamask you can logout current user and authenticate the new user
it looks like it is an error related to redis, like the redis connection doesnāt work any more