1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00
invoiceninja/app/Libraries/OAuth.php
David Bomba f745c3f0a6
Working on Social Authentication (#2458)
* Laravel Socialite + Refactor for searching for Users across multiple databases

* Refactor for Unique User Rules, add Middleware for setting active DB connection per request, more tests
2018-10-18 16:04:36 +11:00

35 lines
656 B
PHP

<?php
namespace App\Libraries;
use Laravel\Socialite\Facades\Socialite;
/**
* Class OAuth
* @package App\Libraries
*/
class OAuth
{
/**
* Socialite Providers
*/
const SOCIAL_GOOGLE = 1;
const SOCIAL_FACEBOOK = 2;
const SOCIAL_GITHUB = 3;
const SOCIAL_LINKEDIN = 4;
const SOCIAL_TWITTER = 5;
const SOCIAL_BITBUCKET = 6;
/**
* @param Socialite $user
*/
public static function handleAuth($user)
{
if(MultiDB::checkUserEmailExists($user->getEmail())) //if email is in the system this is an existing user -> check they are arriving on the correct provider
{
}
}
}