Situation:
- User A registers an account in our application and logs in.
- For what ever reason logs out.
- Logs in to the application again using Facebook social sign on with an account that has the same email associated with it as the original registration had.
- A second account is created for this sign on and 2 accounts exist in the system.
How can I merge these accounts into a single account during the social sign on (by querying for the existence of that email) automatically or with User Collection Business Hooks (if with business hooks, can you please provide an example of how I would do this as documentation online is unclear for this specific purpose).
Notes:
- Kinvey backend
- Phonegap with facebook plugin
- Jquery mobile
- Wish to merge accounts or find existing account and add social identity to it during sign on
- Assume I cannot delete users
- Preferably achieve this step with a PreSave Kinvey Business Logic Hook
Cheers,