candy-api: Unable to login to hub, API responds with "Call to a member function encodedId() on null""
Hello, when logging in to the HUB I encounter the following error:
on endpoint: /api/v1/users/current?includes=roles.permissions,details
{message: "Call to a member function encodedId() on null", exception: "Error",…}
exception: "Error"
file: "/var/www/candy/foodui/vendor/getcandy/candy-api/src/Http/Controllers/Users/UserController.php"
line: 77
message: "Call to a member function encodedId() on null"
trace: [,…]

Expected Behavior
I should be able to login, I followed this guide: https://guides.getcandy.io/getting-started/hub/authentication/#laravel-sanctum
Possible Solution
Investigating still.
Steps to Reproduce
- Setup GetCandy (Clean install), create user, migrate, seed, etc
- Follow the this guide https://guides.getcandy.io/getting-started/hub/authentication/#laravel-sanctum
- Setup the hub, configure your .env
- try to login.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 15 (9 by maintainers)
Thanks for your input on this @Repox since this bug is breaking things for people putting the routes in the
api.phpfile I’ll get a release tagged now.