So I definitely can t wrap my head around this one. I m following a Laravel 5.2 tutorial here.
并且将上述错误列入标题。 我的路线就是这样:
Route::get( / , function () {
if(Auth::check()) return view( auth/register );
return view( auth/login );
});
Route::get( /redirect , MailAuthController@redirect );
Route::get( /callback , MailAuthController@callback );
主计长认为:
<?php
namespace AppHttpControllers;
use IlluminateHttpRequest;
use AppHttpRequests;
use AppHttpControllersController;
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()
{
}
}
服务。 网址是:
<?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 => AppUser::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 ),
],
];
除此以外,我对我可能错失之处没有想法。 Light!