-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Clean authData of null values on _User update #1199
Clean authData of null values on _User update #1199
Conversation
Current coverage is
|
@yuzeh please add unit tests to make sure the fix is correct and doing what's expected the cleaning is currently tested here https://github.com/ParsePlatform/parse-server/blob/master/spec/OAuth.spec.js#L263 |
Hi @flovilmart, I've added a test case that exercises this functionality (if I undo the code in src/, the test will fail). I'm not sure if this is the best place to put it, though. Please advise! |
@yuzeh updated the pull request. |
Can you rebase / squash all those commits? |
481a3d6
to
592daf4
Compare
Adds a step to the RestWrite#execute chain: it cleans the response authData object of null values. For example, this: {"authData": {"anonymous": null}, "updatedAt", ...} will be transformed to this: {"updatedAt", ...} And this: {"authData": {"anonymous": null, "twitter": ...}, "updatedAt", ...} will be transformed to this: {"authData": {"twitter": ...}, "updatedAt", ...} Fixing this issue will fix anonymous user upgrades from the Android SDK.
592daf4
to
1b8e613
Compare
@flovilmart done. BTW, I noticed I currently can't use my fork of parse-server as a dependency in NPM. Is there an easy way to fix this? |
There is still an extra commit.... |
And to answer your question, there is an 'easy' way through git submodules and npm link |
I'm still having a problem with a user having authData set to {"facebook": null} running parse-server 2.2.10 |
Note: I haven't been able to test this because I'm still trying to figure out how to get my project to depend on my fork of parse-server.
Adds a step to the RestWrite#execute chain: it cleans the response
authData object of null values.
For example, this:
will be transformed to this:
And this:
will be transformed to this:
Fixing this issue will fix anonymous user upgrades from the Android SDK.