When the user is not authenticated, the error appears:
"message": "Type error: Argument 1 passed to Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException::__construct() must be of the type string, null given, called in
"C:\xampp\htdocs\doc3w\vendor\dingo\api\src\Auth\Auth.php on line 113".
Expected Behaviour
Reviewing the code in the throwUnauthorizedException method of auth.php (vendor\dingoapi\scr\auth\auth) it appears that if the exception is null, the field is null and void and if we put "" the error appears: "message": "Failed to authenticate because of bad credentials or an invalid authorization header.",
As mentioned in previously closed issue 1548, however in this case I am already using 2.0.0-alpha2 and my laravel version was just upgraded to 5.7, this issue wasn't present prior to that update.
Seems a bit weird, pretty sure this issue has already been fixed a year ago (so even in alpha2 according to github history). Just to confirm, what does your line 113 of that file say?
Actual Behaviour
When the user is not authenticated, the error appears: "message": "Type error: Argument 1 passed to Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException::__construct() must be of the type string, null given, called in "C:\xampp\htdocs\doc3w\vendor\dingo\api\src\Auth\Auth.php on line 113".
Expected Behaviour
Reviewing the code in the throwUnauthorizedException method of auth.php (vendor\dingoapi\scr\auth\auth) it appears that if the exception is null, the field is null and void and if we put "" the error appears: "message": "Failed to authenticate because of bad credentials or an invalid authorization header.",
As mentioned in previously closed issue 1548, however in this case I am already using 2.0.0-alpha2 and my laravel version was just upgraded to 5.7, this issue wasn't present prior to that update.
Cheers, Nicole