Skip to content
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

Saving anonymous users results in account already exists error #218

Closed
silvermana opened this issue Feb 3, 2016 · 5 comments
Closed

Saving anonymous users results in account already exists error #218

silvermana opened this issue Feb 3, 2016 · 5 comments
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@silvermana
Copy link

I found the issue in RestWrite.js:

// Check for username uniqueness
    if (!this.data.username) {
      if (!this.query) {
        // TODO: what's correct behavior here
        this.data.username = '';
      }
      return;}

I'm not sure what the answer is though. When using Parse.com anonymous users could be saved with data before registration took place.

@gfosco
Copy link
Contributor

gfosco commented Feb 4, 2016

I think the fix is to set the username to a random string, as on hosted Parse. But, are you getting an error? Anonymous users was implemented and tested, it just sets the username to an empty string and returns.

@silvermana
Copy link
Author

@gfosco yes, I'm getting a username is taken error because two _Users can't have the same username? The first anonymous user saves fine, but the second errors.

@gfosco gfosco added the type:bug Impaired feature or lacking behavior that is likely assumed label Feb 4, 2016
@jsoendermann
Copy link

I'm having the same problem, subsequent anonymous user saves fail because empty usernames aren't unique.

#259 looks like a duplicate of this bug.

@steven-supersolid
Copy link
Contributor

PR to get things started: #341

@gfosco
Copy link
Contributor

gfosco commented Feb 26, 2016

Should be fixed because of 341.. Please open a new issue if still experiencing a problem. Thanks.

@gfosco gfosco closed this as completed Feb 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

No branches or pull requests

4 participants