Skip to content

Added some missing async/await #248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 10, 2019
Merged

Added some missing async/await #248

merged 4 commits into from
Aug 10, 2019

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.

None yet

2 participants