Sometimes you may face registration/login issue with laravel passport and getting error 401, this error causes:
It will not login the user
It will not redirect user
and return such error in network:
status = 500 message Trying to get property 'client' of non-object exception ErrorException
and in console something like:
Unhandled promise rejection Error: "Request failed with status code 500"
Apparently each time you refresh migrations you have to install new passport and generate new keys.
After refreshing migrations run command below and it should be working with no issue:
php artisan passport:install --force
- Last updated 1 year ago