mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-13 06:32:40 +01:00
Handle personal o365 accounts
This commit is contained in:
parent
9e75ebb317
commit
89f0740703
@ -699,14 +699,14 @@ class LoginController extends BaseController
|
||||
|
||||
if($provider == 'microsoft'){
|
||||
$scopes = ['email', 'Mail.ReadWrite', 'Mail.Send', 'offline_access', 'profile', 'User.Read openid'];
|
||||
$parameters = ['access_type' => 'offline', "prompt" => "consent select_account", 'redirect_uri' => config('ninja.app_url')."/auth/microsoft"];
|
||||
$parameters = ['access_type' => 'offline', 'redirect_uri' => config('ninja.app_url')."/auth/microsoft"];
|
||||
}
|
||||
|
||||
if (request()->has('code')) {
|
||||
return $this->handleProviderCallback($provider);
|
||||
} else {
|
||||
|
||||
if(!in_array($provider, ['google']))
|
||||
if(!in_array($provider, ['google','microsoft']))
|
||||
return abort(400, 'Invalid provider');
|
||||
|
||||
return Socialite::driver($provider)->with($parameters)->scopes($scopes)->redirect();
|
||||
|
Loading…
Reference in New Issue
Block a user