{"action":"opened","issue":{"url":"https://api.github.com/repos/laravel/passport/issues/807","repository_url":"https://api.github.com/repos/laravel/passport","labels_url":"https://api.github.com/repos/laravel/passport/issues/807/labels{/name}","comments_url":"https://api.github.com/repos/laravel/passport/issues/807/comments","events_url":"https://api.github.com/repos/laravel/passport/issues/807/events","html_url":"https://github.com/laravel/passport/issues/807","id":355058299,"node_id":"MDU6SXNzdWUzNTUwNTgyOTk=","number":807,"title":"Laravel passport does not see the token, causing \"unauthenticated\" message","user":{"login":"mfgabriel92","id":26734503,"node_id":"MDQ6VXNlcjI2NzM0NTAz","avatar_url":"https://avatars1.githubusercontent.com/u/26734503?v=4","gravatar_id":"","url":"https://api.github.com/users/mfgabriel92","html_url":"https://github.com/mfgabriel92","followers_url":"https://api.github.com/users/mfgabriel92/followers","following_url":"https://api.github.com/users/mfgabriel92/following{/other_user}","gists_url":"https://api.github.com/users/mfgabriel92/gists{/gist_id}","starred_url":"https://api.github.com/users/mfgabriel92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfgabriel92/subscriptions","organizations_url":"https://api.github.com/users/mfgabriel92/orgs","repos_url":"https://api.github.com/users/mfgabriel92/repos","events_url":"https://api.github.com/users/mfgabriel92/events{/privacy}","received_events_url":"https://api.github.com/users/mfgabriel92/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-29T08:46:18Z","updated_at":"2018-08-29T08:46:18Z","closed_at":null,"author_association":"NONE","body":"Suddenly my application stopped working when trying to access endpoints protected by `auth:api` middleware in the Laravel 5.6.35 back-end using Passport 7.0.1. I've been using it for two weeks but today, after a database refresh, it decided to stop working.\r\n\r\nThe issue is that it is generating when I register and log-in.\r\n\r\n    return Response::json([\r\n        'token' => $user->createToken('foobar')->accessToken,\r\n        'user' => $user\r\n    ], HTTPResponse::$HTTP_OK);\r\n\r\nInsomnia rest will then show the following when accessing the routes belonging to the `auth:api` middleware.\r\n\r\n> \"message\": \"Unauthenticated.\"\r\n\r\nIt was working until an hour ago, and it stopped after I refreshed the database. I dropped and created a new one, registered a test user and attempted to access and endpoint passing the token as `Bearer` token and Accept header to `application/json`.\r\n\r\nI don't know how to solve it. I saw where it was failing in `TokenGuard.php` file, but what to do? Why has it suddenly stopped?"}}
{"actor":{"display_login":"mfgabriel92"}}