Just going to preface this question by saying that I'm diving back into Laravel after a while of not using it, it appears there are a lot of changes, and the current project in question is using A LOT of the baked in "Laravel Ecosystem"... so I could be missing some context here.
The issue : After upgrading from Laravel 5.6 to 5.7, auth-guarded API routes are busting because of session expiry, even immediately after logging in (prompting logout).
The configuration :
/config/auth.php
'guards' => ['api' => ['driver' => 'spark']]
/routes/api.php
Route::group([
'middleware' => 'auth:api'
], function () {
// Routes in here are busting
}
/app/Providers/SparkServiceProvider.php
protected $usesApi = true; // yup
Additional info :
- The site uses the Socialite plugin for managing user authentication
- There are indeed
spark_token
's in the request - Vue client making the calls, getting status
401 Unauthorized
on the next page load after successfully authenticating via login form
Any ideas?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire