hoodiehq-archive / hoodie-plugin-users

⛔ deprecated
Other
5 stars 9 forks source link

signup after anonymous signup fails #10

Closed gr2m closed 10 years ago

gr2m commented 10 years ago

to fix do https://github.com/gr2m/hoodie-plugin-users/commit/6d436852cb0bdb9a211bdc424d840ca7c09de9e9

gr2m commented 10 years ago

@caolan could you look into this please. It's a hard to catch issue for people looking into hoodie right now, and fix is rather simple I think?

caolan commented 10 years ago

I didn't realize we had anything other than 'user' for type apart from password resets. This seems like a totally sensible change though.

gr2m commented 10 years ago

yeah, fyi: we differentiate between two user types:

  1. The ones that sign up on purpose (using hoodie.account.signUp)
  2. The ones that sign up anonymously (using hoodie.account.aonnymousSignUp)

For example, hoodie.task.start() is doing hoodie.account.aonnymousSignUp internally to make sure that the tasks get picked up by a server, the user doesn't even realize that his/her data is now being synched. If the user runs hoodie.account.signUp later on, it's internally a user rename, from something like user_anonymous/abc4567 to user/joe@example.com.

Makes sense?

caolan commented 10 years ago

ah, the magic behind hoodie ;)