Unable to authenticate in moralis, isAuthenicated is false

I’m trying to authenticate

const { Moralis, authenticate, isAuthenticated, isInitialized } = useMoralis();
await Moralis.authenticate()

after calling above and error is thrown as below

Uncaught (in promise) TypeError: _ParseUser.default.currentAsync is not a function

My Dependencies

“moralis”: “^1.8.1”,

“react-moralis”: “^1.3.5”,

it looks like someone else got same error when moralis 2.0 was installed:

Tried the versions in above thread still the error remains same

with react-moralis

 const { Moralis, authenticate, isAuthenticated, isInitialized } = useMoralis();
await authenticate({ signingMessage: signinMessage })

It won’t even throw an error it just does not work

could you try with a new project? to be sure that you have the expected versions

Tried with a new project, but still didn’t go through

“moralis”: “^1.8.1”,

“react-moralis”: “^1.3.5”,

Got to know from your team guys in discord that above version are also not stable

Can you please try [email protected] and [email protected] - these were the stable versions before the transition to 2.0.

If you used yarn to install, try npm instead (and vice-versa).

Tried all combinations still the issue remains the same

Which dependencies do you have at this stage? You tried [email protected] and [email protected] and [email protected] and [email protected] in a new Create-React-App project?

Have you tried another browser/incognito?

I have tried in new project, but the authenicate method coming from react-moralis doesn’t work, Moralis.authenticate works but the isAuthenicated value is always false

1 Like

You need to use authenticate from the useMoralis hook for isAuthenticated to change, not Moralis.authenticate.

I used authenticate from useMoralis hook, the method authenticate itself is not working.

did you try with a new empty project?

try to install moralis-v1 instead of moralis

I tried but get this error
`

TypeError: Right-hand side of ‘instanceof’ is not callable

Versions

"moralis-v1": "^1.11.0",
"react-moralis": "^1.4.1",

`

authenticate method from useMoralis hook does not work as well with above packages and versions

try react-moralis 1.4.0 without that ^

tried but the issue remains same, I got recommendation from discord to use Moralis.authenticate

you can also try to use Moralis.isAuthenticated in this case

@rajathongal I got same error resolved go to moralis.io login and created server update it will resolve issue that isAuthenticated false

below image has nft and below setting
in your case it’s showing update you have to click on this and check your project will work

try to use one of these 2 commands in your terminal

#yarn
yarn add --exact [email protected] [email protected]

#npm
npm i --save-exact [email protected] [email protected]

if this doesnt fix your problem, open your browser console and check for any errors while trying to authenticate. If the authentication is not successful isAuthenticated will return false