mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
fixeS
This commit is contained in:
parent
aceb377081
commit
3ee0186c67
@ -117,98 +117,6 @@ class LoginController extends BaseController
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
public function handleProviderCallbackAndCreate(string $provider)
|
||||
{
|
||||
$socialite_user = Socialite::driver($provider)
|
||||
->stateless()
|
||||
->user();
|
||||
|
||||
if($user = OAuth::handleAuth($socialite_user, $provider))
|
||||
{
|
||||
Auth::login($user, true);
|
||||
|
||||
return redirect($this->redirectTo);
|
||||
}
|
||||
else if(MultiDB::checkUserEmailExists($socialite_user->getEmail()))
|
||||
{
|
||||
Session::flash('error', 'User exists in system, but not with this authentication method'); //todo add translations
|
||||
|
||||
return view('auth.login');
|
||||
}
|
||||
else {
|
||||
//todo
|
||||
$name = OAuth::splitName($socialite_user->getName());
|
||||
|
||||
$new_account = [
|
||||
'first_name' => $name[0],
|
||||
'last_name' => $name[1],
|
||||
'password' => '',
|
||||
'email' => $socialite_user->getEmail(),
|
||||
'oauth_user_id' => $socialite_user->getId(),
|
||||
'oauth_provider_id' => $provider
|
||||
];
|
||||
|
||||
$account = CreateAccount::dispatchNow($new_account);
|
||||
|
||||
Auth::login($account->default_company->owner(), true);
|
||||
|
||||
$cookie = cookie('db', $account->default_company->db);
|
||||
|
||||
return redirect($this->redirectTo)->withCookie($cookie);
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* We use this function when OAUTHING via the web interface.
|
||||
*
|
||||
* @return redirect
|
||||
|
||||
public function handleProviderCallback(string $provider)
|
||||
{
|
||||
$socialite_user = Socialite::driver($provider)
|
||||
->stateless()
|
||||
->user();
|
||||
|
||||
if($user = OAuth::handleAuth($socialite_user, $provider))
|
||||
{
|
||||
Auth::login($user, true);
|
||||
|
||||
return redirect($this->redirectTo);
|
||||
}
|
||||
else if(MultiDB::checkUserEmailExists($socialite_user->getEmail()))
|
||||
{
|
||||
Session::flash('error', 'User exists in system, but not with this authentication method'); //todo add translations
|
||||
|
||||
return view('auth.login');
|
||||
}
|
||||
else {
|
||||
//todo
|
||||
$name = OAuth::splitName($socialite_user->getName());
|
||||
|
||||
$new_account = [
|
||||
'first_name' => $name[0],
|
||||
'last_name' => $name[1],
|
||||
'password' => '',
|
||||
'email' => $socialite_user->getEmail(),
|
||||
'oauth_user_id' => $socialite_user->getId(),
|
||||
'oauth_provider_id' => $provider
|
||||
];
|
||||
|
||||
$account = CreateAccount::dispatchNow($new_account);
|
||||
|
||||
Auth::login($account->default_company->owner(), true);
|
||||
|
||||
$cookie = cookie('db', $account->default_company->db);
|
||||
|
||||
return redirect($this->redirectTo)->withCookie($cookie);
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* A client side authentication has taken place.
|
||||
* We now digest the token and confirm authentication with
|
||||
|
@ -8,10 +8,22 @@
|
||||
<meta name="google-signin-client_id" content="{{ config('services.google.client_id') }}">
|
||||
<link rel="manifest" href="manifest.json?v={{ config('ninja.app_version') }}">
|
||||
<script src="{{ asset('js/pdf.min.js') }}"></script>
|
||||
@if(\App\Utils\Ninja::isHosted())
|
||||
<script type="text/javascript" src="https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="https://alcdn.msauth.net/browser/2.14.2/js/msal-browser.min.js"
|
||||
integrity="sha384-ggh+EF1aSqm+Y4yvv2n17KpurNcZTeYtUZUvhPziElsstmIEubyEB6AIVpKLuZgr"
|
||||
crossorigin="anonymous">
|
||||
</script>
|
||||
@endif
|
||||
<script type="text/javascript">
|
||||
pdfjsLib.GlobalWorkerOptions.workerSrc = "{{ asset('js/pdf.worker.min.js') }}";
|
||||
</script>
|
||||
<script>
|
||||
window.flutterConfiguration = {
|
||||
canvasKitBaseUrl: "/canvaskit/"
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
<body style="background-color:#888888;">
|
||||
|
||||
@ -153,12 +165,6 @@
|
||||
|
||||
<script defer src="{{ $path }}?v={{ config('ninja.app_version') }}" type="application/javascript"></script>
|
||||
|
||||
|
||||
<script type="text/javascript"
|
||||
src="https://alcdn.msauth.net/browser/2.14.2/js/msal-browser.min.js"
|
||||
integrity="sha384-ggh+EF1aSqm+Y4yvv2n17KpurNcZTeYtUZUvhPziElsstmIEubyEB6AIVpKLuZgr"
|
||||
crossorigin="anonymous">
|
||||
</script>
|
||||
<center style="padding-top: 150px" id="loader">
|
||||
<div class="loader"></div>
|
||||
</center>
|
||||
|
Loading…
x
Reference in New Issue
Block a user