The Services module provides an HTTP REST API for authentication (amongst other things). So it should be easily usable to let a remote/separated site re-use your Drupal web site user authentication. The following code comes from its documentation and illustrate how to use it for user authentication. The returned user object will contain the session name and id to use in future REST request if more data from the Drupal are needed (for instance to retrieve user profile or content).
// REST Server URL
$request_url = 'http://your-drupal/rest_server_endpoint/user/login';
// User data
$user_data = array(
'username' => 'user_name',
'password' => 'user_password',
);
$user_data = http_build_query($user_data);
// cURL
$curl = curl_init($request_url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Accept: application/json')); // Accept JSON response
curl_setopt($curl, CURLOPT_POST, 1); // Do a regular HTTP POST
curl_setopt($curl, CURLOPT_POSTFIELDS, $user_data); // Set POST data
curl_setopt($curl, CURLOPT_HEADER, FALSE); // Ask to not return Header
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_FAILONERROR, TRUE);
$response = curl_exec($curl);
$http_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
// Check if login was successful
if ($http_code == 200) {
// Convert json response as array
$logged_user = json_decode($response);
}
else {
// Get error msg
$http_message = curl_error($curl);
die($http_message);
}