Open carpusmedia opened 7 years ago
It seems like we found the problem.
As discovered in https://github.com/CallMeNP/lara-auth-bridge/issues/11, the problem is that ApiController::getSession is not able to validate the session.
The reason for this is that since Laravel 5.2, you need to wrap the routes in a web middleware to access the session state across the board (like the global in 5.1).
Simply change the routes declaration in laravel/vendor/callmenp/lara-auth-bridge/src/CallMeNP/LaraAuthBridgeServiceProvider.php from this:
Route::get('/auth-bridge/login', 'CallMeNP\LaraAuthBridge\Controllers\ApiController@getSession');
Route::post('/auth-bridge/login', 'CallMeNP\LaraAuthBridge\Controllers\ApiController@doLogin');
Route::delete('/auth-bridge/login', 'CallMeNP\LaraAuthBridge\Controllers\ApiController@doLogout');
to this:
Route::group(['middleware' => ['web']], function () {
Route::get('/auth-bridge/login', 'CallMeNP\LaraAuthBridge\Controllers\ApiController@getSession');
Route::post('/auth-bridge/login', 'CallMeNP\LaraAuthBridge\Controllers\ApiController@doLogin');
Route::delete('/auth-bridge/login', 'CallMeNP\LaraAuthBridge\Controllers\ApiController@doLogout');
});
This solved the problem for us.
Hello,
We are not able to get lara-auth-bridge to work properly. We are using Laravel 5.2.
When we try to log in to the forum, we get this error message:
No errors are created in the Laravel logs.
We've followed the instructions in the Readme, this is the setup:
laravel/config/app.php
laravel/config/lara-auth-bridge.php
laravel/app/Http/Middleware/VerifyCsfrToken.php
phpbb/ext/laravel/bridgebb/auth/provider/bridgebb.php
The forum is hosted on a subdomain as well (http://forum.domain.com)
PHPBB: 3.1.10 Laravel: 5.2 lara-auth-bridge: 2.1.0 laravel/bridgebb: 2.0.0