| Q | A
| ----------------- | ---
| Framework | Laravel
| Framework version | 5.5.*
| Package version | 1.0.0-rc.1
| PHP version | 7.1
hey, did you solved this issue @varichs ?
hey, did you solved this issue @varichs ?
yes, I just used the wrong middleware name
@varichs I have the same error, can you specify how you solved it? please
@chaucachavez
I fixed, making this change
AuthController.php
old
public function __construct()
{
$this->middleware('jwt', ['except' => ['login']]);
}
new
public function __construct()
{
$this->middleware('auth:api', ['except' => ['login']]);
}
Thanks a lot @alexarros ! :clap: It worked for me.
it works thanks!
in case someone finds this because of the error "Target class [auth.jwt] does not exist.": don麓t forget to add:
protected $routeMiddleware = [
'auth.jwt' => Authenticate::class,
];
Most helpful comment
@chaucachavez
I fixed, making this change
AuthController.php
old
public function __construct()
{
$this->middleware('jwt', ['except' => ['login']]);
}
new
public function __construct()
{
$this->middleware('auth:api', ['except' => ['login']]);
}