Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parse.com JavaScript SDK - How can I refresh the cached user object?

The cached Parse user object in local storage is only updated on login or signup. I'd like to refresh it when my app loads to make sure any modifications are in sync. How can I do that?

According to this thread from the Parse.com forums archive, there should be a method Parse.User.current().refresh() to do just that, but in the latest version of the JS SDK that method doesn't seem to exist.

Thanks! Any help appreciated!

like image 220
Jack Senechal Avatar asked Sep 03 '26 01:09

Jack Senechal


1 Answers

Fetch the model from the server

Parse.User.current().fetch()

https://parse.com/docs/js/api/symbols/Parse.Object.html#fetch

like image 140
Stan Kondrat Avatar answered Sep 04 '26 17:09

Stan Kondrat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!