protected function addProviderIdentity($user, $providerAlias, $details)
{
$identity = new OAuthIdentity();
$identity->user_id = $user->getKey();
$identity->provider = $providerAlias;
$identity->provider_user_id = $details->id;
$identity->access_token = $details->access_token;
$this->identities->store($identity);
}