Skip to content

Still have issues logging in with anonymous user #1198

Closed
@yuzeh

Description

@yuzeh

I'm opening a new issue to document my ongoing issues with upgrading from anonymous users.

This is related to #1136 and #639.

On the latest release, authData is still not properly cleaned on PUT requests for the _User class. See below for VERBOSE=1 logs from a parse-server I've set up. This causes an error on the Android SDK.

There are probably two good ways of fixing this:

  • do the clean up on the client side (in this case, the Android SDK) before issuing the PUT request.
  • do the clean up on the server side before sending the response.

1ed868b goes part of the way to fixing it server-side, but does not do it everywhere it should.

I'm in the process of putting a pull request that will fix this in RestWrite.js handleUpdate as well as handleLogIn in UsersRouter.


For implementation related questions or technical support, please refer to the Stack Overflow and Server Fault communities.

Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!

Environment Setup

AWS/ElasticBeanstalk, parse-server 2.2.2

Steps to reproduce

It will be hard to give clean repro steps on a general app that has anonymous users enabled, but if requested I'll try.

Logs/Trace

The Android SDK issues a PUT request for signup instead of calling the signUp endpoint because this user already has data saved to the parse-server. The key thing to notice is that in the response, the value associated with authData is {"anonymous": null} instead of null.

PUT /parse/classes/_User/bCsdHm4wrT {
  'content-length': '260',
  'accept-encoding': 'gzip',
  'content-type': 'application/json',
  'user-agent': 'Parse Android SDK 1.13.0 (com.mtailor.android.debug/34) API Level 23',
  'x-forwarded-port': '443',
  'x-forwarded-proto': 'https' } {
  "firstName": "D",
  "password": REDACTED,
  "username": "[email protected]",
  "authData": {
    "anonymous": null
  },
  "lastName": "H",
  "email": "[email protected]",
  "objectId": "bCsdHm4wrT"
}
response: {
  "response": {
    "updatedAt": "2016-03-25T20:27:21.104Z",
    "authData": {
      "anonymous": null
    },
    "firstName": "D",
    "username": "[email protected]",
    "lastName": "H",
    "email": "[email protected]",
    "_hashed_password": "REDACTED"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions