Closed tsperling closed 6 years ago
Do you have an exception stack from storage/logs/laravel.log? Could you post it here please?
There seems to be a bug in Laravel Passport that causes this, but I found a workaround, try putting this in any SP of yours:
$this->app->singleton(\Illuminate\Hashing\HashManager::class, function ($app) {
return new \Illuminate\Hashing\HashManager($app);
});
Hi, thanks for the help - unfortunately, I'm still having this problem. Code was added to the register() method of AppServiceProvider, which is uncommented in bootstrap/app.php
There's nothing relating to this in the log, it's just being rejected like any invalid route.
@tsperling did you register the routes?
Dusterio\LumenPassport\LumenPassport::routes($this->app);
Yes, that's in place - AppServiceProvider.php looks like this:
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
public function boot()
{
\Dusterio\LumenPassport\LumenPassport::routes($this->app);
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
$this->app->singleton(\Illuminate\Hashing\HashManager::class, function ($app) {
return new \Illuminate\Hashing\HashManager($app);
});
}
}
Looks like this was a combination of the Passport bug and user error - restarted with the latest version of lumen-passport & correctly using HTTPS requests, POST requests are now working correctly. Many thanks :)
Similar issue to some already posted, but slightly different in that, having followed the setup guide, all oauth routes are working ok (resulting in an 'Unauthorized.' message when no parameters are passed), except for the POST /oauth/token route, which gives the standard Laravel 405 error page.
This is on a new installation of Lumen 5.6, using latest version of lumen-passport. Tested using Postman.
I've tried the different methods, but all give the same result. Including the required parameters with the request has no effect.