私は間違いなくこの問題を回避することはできません。私はLaravel 5.2のチュートリアルに従っています。Laravel SocialiteとOffice365:Manager.phpでInvalidArgumentExceptionが発生しました90:ドライバー[Microsoft]がサポートされていません
http://blog.damirmiladinov.com/laravel/laravel-5.2-socialite-facebook-login.html#.V2gUIrgrJPY
そしてタイトルに上記のエラーを取得。私のルートは次のようになります。
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Socialite;
class MailAuthController extends Controller
{
//
public function redirect()
{
return \Socialite::with('microsoft')->redirect();
}
public function callback()
{
// when microsoft calls with token
}
public function user()
{
}
}
そしてservices.php次のようになります:私は私は考えている
<?php
return [
/*
|--------------------------------------------------------------------------
| Third Party Services
|--------------------------------------------------------------------------
|
| This file is for storing the credentials for third party services such
| as Stripe, Mailgun, Mandrill, and others. This file provides a sane
| default location for this type of information, allowing packages
| to have a conventional place to find your various credentials.
|
*/
'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
],
'mandrill' => [
'secret' => env('MANDRILL_SECRET'),
],
'ses' => [
'key' => env('SES_KEY'),
'secret' => env('SES_SECRET'),
'region' => 'us-east-1',
],
'sparkpost' => [
'secret' => env('SPARKPOST_SECRET'),
],
'stripe' => [
'model' => App\User::class,
'key' => env('STRIPE_KEY'),
'secret' => env('STRIPE_SECRET'),
],
'microsoft' => [
'client_id' => env('MICROSOFT_CLIENT_ID'),
'client_secret' => env('MICROSOFT_CLIENT_SECRET'),
'redirect' => env('http://localhost:8000/callback'),
],
];
そして、それ以外の
Route::get('/', function() {
if(Auth::check()) return view('auth/register');
return view('auth/login');
});
Route::get('/redirect', '[email protected]');
Route::get('/callback', '[email protected]');
コントローラは、このようになります間違っている可能性があります。私の方法で光を!
あなたはMicrosoftとしようとしています。しかし、このエラーは「Driver [Microsoft]はサポートされていません」と述べています。また、Socialiteのドキュメントごとに、Socialiteは現在、Facebook、Twitter、LinkedIn、Google、GitHub、Bitbucketによる認証をサポートしています。 –
それでは、Microsoftをサポートできるようにカスタムドライバを作成する方法は? –