Hi Folks,
I have an app where users have signed up with email and password. I am not adding facebook login. Here are all the cases that I am dealing with:
1) New user sign up
Not a problem.
2) New user sign up but doesn’t authorize email
I force the user to enter email in the app as part of sign up flow. I did this using a popup that asks for email check the ‘This popup can’t be closed by pressing esc’.
3) Existing user tries to login with Facebook - same email
The default error is “email already in use”. I’m tried using an error handler here to give a more helpful message like “please login using your email and then connect your facebook account”. But the error handler does not seem to work in a workflow with this button. This is not solved, possibly a bug?
4) Existing user tries to login with Facebook - different email.
This will craete create a totally different account. Here is how I handled this:
- When someone logs in with facebook, send a url paramater ‘login=facebook’
- On page load (when url parameter login=facebook) && user first name is empty (indicates user does not have an account), show this message:
- User clicks either option > delete user > navigate to login or signup page
5) Existing user tried to link Facebook (after login) - same email
User’s facebook information is linked to the existing user. All good.
6) Existing user tries to link Facebook (after login) - different email
User’s facebook information is linked to the existing user. All good.
OPEN ISSUES
I also have not yet figured out how to hide the password change option for users who signed up with facebook (and therefore dont have a password). See How to check if password exists? - #3 by rushabh