Closed matiyin closed 2 years ago
It might take some time before the user verifies the email. Therefore we do not know when to refetch the data.
So it depends on the use-case when you want/need to refetch the user data. Once you know that the user has verified the email, you can call:
await Moralis.User.current().fetch();
This will refetch the data from the current from the server.
If you have more questions then please reach out to moralis.forum.io for any other support. We have a more active people over there working to help out with any questions or support.
New Bug Report
Checklist
Issue Description
The user session in localStorage is not updated when changing the
emailVerified
value in a User object. User needs to log in and out to show the correct setting for emailVerfied. Since all other fields are updated fine, I'm expecting this value to also update when changed in the User object.Steps + code to reproduce
await Moralis.User.requestEmailVerification('<email>')
and returning the email callbackMoralis.User.current().get('emailVerified')
is not returningtrue
Moralis.User.current().get('emailVerified')
is returningtrue
Actual Outcome
After a successful email verification,
Moralis.User.current().get('emailVerified')
is not returningtrue
in the current sessionExpected Outcome
After a successful email verification,
Moralis.User.current().get('emailVerified')
is should returntrue
in the current sessionEnvironment
Server
0.0.374
Client
1.8.1
Linux
Chromium