mercredi 17 janvier 2018

Passport/API access when not logged in?

As suggested in the docs:

Passport includes an authentication guard that will validate access tokens on incoming requests. Once you have configured the api guard to use the passport driver, you only need to specify the auth:api middleware on any routes that require a valid access token:

So I have updated my route service provider:

protected function mapApiRoutes()
{
    Route::prefix('api')
         ->middleware('auth:api')
         ->namespace($this->namespace)
         ->group(base_path('routes/api.php'));
}

The issue is that I can now only access my api if I am logged in, but how can it be accessed via non logged in users?



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

Aucun commentaire:

Enregistrer un commentaire