My website provide the user to create an account and log in with facebook. The user table contain: userId (generated by $userId = uniqid(rand(), true;
, if user creating his own account). password, salt, email, date joined.
1st question:
I am not sure if what I am doing with facebook is safe. Right now I am getting user ID from facebook and sending it to server with xmlhttpRequest object. Then server store it under userID and leave other columns blank.
2nd question:
Is the possibilities significant for the facebook userID to overlap with normal account's userid generated by uniquid(rand(), true)
3rd question:
is it safe to use client side login? I mean even my App ID will be seen by users.
4th question: In order to tell if the entry is a facebook account or normal account, should I add another column in database, true=facebook account, false=normal account. Or should I just check to see if password column is blank for the certain account?