Skip to content

Conversation

@hyperrecursive
Copy link
Contributor

Some functions in ParseUser declared as async were calling other async functions without the await keyword. This, for example, was causing that calling ParseUser.currentUser() right after currentUser.signUp() returned did not return the correct session id.
Additionally, user data after calling ParseUser.save was not added to storage, therefore to get latest user data you needed to sync with server first.

…n await, which caused 'invalid session token' error if user ParseUser.currentUser() immediately after ParseUser.signUp() or ParseUser.login().

Added missing awaits in other places.
…ion.

Reason: no safeInStorage() after save() was called.
Fix: calling saveInStorage() after save().
@phillwiggins phillwiggins merged commit 79b3df9 into parse-community:master Aug 10, 2019
@hyperrecursive hyperrecursive deleted the dev branch August 11, 2019 08:25
phillwiggins pushed a commit that referenced this pull request Aug 14, 2019
…/await fixes from master. (#254)

* Added some missing async/await (#248)

* Updated dependencies.

* ParseUser._handleResponse was calling saveInStorage() async without an await, which caused 'invalid session token' error if user ParseUser.currentUser() immediately after ParseUser.signUp() or ParseUser.login().
Added missing awaits in other places.

* ParseUser was not updated in storage after a successful save() operation.
Reason: no safeInStorage() after save() was called.
Fix: calling saveInStorage() after save().

* Revert "Updated dependencies."

This reverts commit dbbc5e8.

* forceUpdate was ignored when setting ParseBase properties

* Setting objectData properties directly in parseJson function to prevent making decoded object properties dirty

* Made forceUpdate false by default in ParseBase set method

* Revert incorrect merge
fischerscode pushed a commit to fischerscode/Parse-SDK-Flutter that referenced this pull request Sep 5, 2020
* Updated dependencies.

* ParseUser._handleResponse was calling saveInStorage() async without an await, which caused 'invalid session token' error if user ParseUser.currentUser() immediately after ParseUser.signUp() or ParseUser.login().
Added missing awaits in other places.

* ParseUser was not updated in storage after a successful save() operation.
Reason: no safeInStorage() after save() was called.
Fix: calling saveInStorage() after save().

* Revert "Updated dependencies."

This reverts commit dbbc5e8.
fischerscode pushed a commit to fischerscode/Parse-SDK-Flutter that referenced this pull request Sep 5, 2020
…/await fixes from master. (parse-community#254)

* Added some missing async/await (parse-community#248)

* Updated dependencies.

* ParseUser._handleResponse was calling saveInStorage() async without an await, which caused 'invalid session token' error if user ParseUser.currentUser() immediately after ParseUser.signUp() or ParseUser.login().
Added missing awaits in other places.

* ParseUser was not updated in storage after a successful save() operation.
Reason: no safeInStorage() after save() was called.
Fix: calling saveInStorage() after save().

* Revert "Updated dependencies."

This reverts commit dbbc5e8.

* forceUpdate was ignored when setting ParseBase properties

* Setting objectData properties directly in parseJson function to prevent making decoded object properties dirty

* Made forceUpdate false by default in ParseBase set method

* Revert incorrect merge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants