Skip to content

Failed signup attempt with anonymous ParseUser leaves it in inconsistent state #401

Open
@yuzeh

Description

@yuzeh

Hi,

Whenever a signup fails with an anonymous ParseUser, I've noticed a couple of things:

  • The app will still have a session token for that user which has been invalidated by the server (any CloudFunction call will error with an "invalid session token" message).
  • The user is not considered anonymous anymore! Calling ParseAnonymousUtils.isLinked(ParseUser.current()) returns false.

Reproduction steps:

  • Enable anonymous users.
  • Save the current (anonymous) user to the backend. (Not sure if this is important, but this is what our app will do).
  • Trigger a failed signup attempt. I've only tried signing up with a username that already exists.
  • Read the value of ParseAnonymousUtils.isLinked(ParseUser.current()).

From my understanding, the last value should be true, but is actually false.

These things are troubling because we are using ParseAnonymousUtils.isLinked(ParseUser.current()) to determine if the user is currently logged in registered (user is logged in registered iff that returns false).

Two questions:

  • Is !ParseAnonymousUtils.isLinked(ParseUser.current()) the right way to determine if a previously anonymous user is logged in registered?
  • If not, what is the right way? If so, is the current behavior I'm seeing in fact a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions