On the website, there will be two ways of login - facebook login or website standard login.
What is the correct way to determine if user logged with facebook or website login?
I am thinking adding a field called login_type field in users table.
value will be "facebook" or "standard"
If user logged in via facebook then store the value of login_type in the session something like $_SESSION['login_type'] = "facebook";
However, if user want to logout, we need to make sure to execute facebook logout function.
Something like this?
logout.php
if ($_SESSION['login_type'] == "facebook") {
$facebook->getLogoutUrl()
//execute the url to CURL?
header("LOCATION: index.php");
}