-
-
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
Can/Should user.authData.anonymous ever be null? #639
Comments
Looks like this can happen when an anonymous user is unlinked... There should always be an |
This happens every time an anonymous user who has data saved to the cloud performs a registration. I'm not sure how to simulate that with just REST API calls. Is there an easy way to log the HTTP requests being made on the iOS or Android SDKs? |
If you run the server with the environment variable VERBOSE=1 you get log output of all the requests and responses... What do you mean by "performs a registration" ? Are they already an anonymous user and then their authData changes?... I'm going to close this but if you get back with more details we can re-open it or move to a new issue. Thanks. |
Good afternoon, I have the same issue as mentioned and I have the verbose mode activated on my server: Here are the logs:
Actually it has only one issue, it saves every data except the username and also it only works one time: if you redo the request, it will lead you to a 206 error. I guess it is a bug of Android SDK more than Parse Server issue. But what I'm sure is that the version of my code works with Parse.com |
Setting authData.anonymous to null is the signal sent to parse-server that we should delete the anonymous authData from the user, it occurs alongside setting a username and password or linking with a 3rd party auth. Are you sure the username don't get saved to the database? That seems very odd. the 206 errors is when the session is missing. |
Hey @flovilmart, First, thanks for your time. Ok so in my case it is normal that I send authData: null because I'm transforming the anonymous into a normal one (with username and password, as you can see in the request). In the request I posted above, is there something which should be different? I'll try to see in the mongo directly but I assume the Parse Dashboard is correct for such a thing right? |
I see now, the username don't get updated properly right? |
No it doesn't and it is not the only problem: after this, I have an update for the user where he enters some data and I send that:
And I receive that:
And I'm pretty sure it is closely related. |
Not sure I'll have time to cover that, but i'll try to have a look |
Great! Because it is actually pretty problematic for every Android Code using Parse Server. Nevertheless, I'm fully available to help! Do you have a snippet of Android which is working with Anonymous and Parse server (from all what I tried, I didn't succeed) |
We use mostly unit tests as edge to edge testing is far more complex. Try to reproduce through a unit test your problem, that would be a good start if you wanna help :) there are plenty of examples in the spec folder of the repository of what you're trying to do. |
Hi,
Whenever an anonymous user is registered, the "authData" column for that user becomes:
This differs (I believe) from the behavior of hosted Parse in that hosted Parse would simply omit the authData column if it ever encountered this value.
The current behavior of parse-server with regard to this doesn't seem to affect the iOS SDK, but does cause a few problems with the Android SDK.
I filed an issue against the Android SDK, and I was told this was a parse-server issue.
How should I proceed?
The text was updated successfully, but these errors were encountered: