jeudi 23 novembre 2017

Laravel OAuth token not working with Barryvdh\Cors and Passport

I'm working with laravel, using Cors and passport. Everything works great but authentication with the route () is not working always get

"Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource"

every other route is working perfectly. SO I just need to tell passport to use cors, I have tried this

In AuthServiceProvider

Passport::routes(null, ['middleware' => [\Barryvdh\Cors\HandleCors::class]]);

and this

 Route::group(['middelware' => 'cors'], function () {
        Passport::routes();
         });

but nothing, login with oauth no working at all. Thank you in advance!!!



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2B5Kbic
via IFTTT

Aucun commentaire:

Enregistrer un commentaire