{"action":"opened","issue":{"url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/issues/426","labels_url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/issues/426/labels{/name}","comments_url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/issues/426/comments","events_url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/issues/426/events","html_url":"https://github.com/lucadegasperi/oauth2-server-laravel/issues/426","id":88043936,"number":426,"title":"Password Grant","user":{"login":"mgarciadelojo","id":1866396,"avatar_url":"https://avatars.githubusercontent.com/u/1866396?v=3","gravatar_id":"","url":"https://api.github.com/users/mgarciadelojo","html_url":"https://github.com/mgarciadelojo","followers_url":"https://api.github.com/users/mgarciadelojo/followers","following_url":"https://api.github.com/users/mgarciadelojo/following{/other_user}","gists_url":"https://api.github.com/users/mgarciadelojo/gists{/gist_id}","starred_url":"https://api.github.com/users/mgarciadelojo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgarciadelojo/subscriptions","organizations_url":"https://api.github.com/users/mgarciadelojo/orgs","repos_url":"https://api.github.com/users/mgarciadelojo/repos","events_url":"https://api.github.com/users/mgarciadelojo/events{/privacy}","received_events_url":"https://api.github.com/users/mgarciadelojo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-13T18:20:35Z","updated_at":"2015-06-13T18:20:35Z","closed_at":null,"body":"Hi,\r\n\r\nFirst of all, thank you very much for this awesome package.\r\n\r\nI am pretty new to oAuth, and after I decided to use the password grant and coded everything I faced a problem, but don't know what it's wrong. I configured the grant in my laravel app, using this code in the oauth2.php config file:\r\n\r\n```\r\n    'grant_types' => [\r\n        'password' => [\r\n            'class' => '\\League\\OAuth2\\Server\\Grant\\PasswordGrant',\r\n            'access_token_ttl' => 604800,\r\n            'callback' => function ($username, $password) {\r\n                $credentials = [\r\n                    'email' => $username,\r\n                    'password' => $password,\r\n                ];\r\n\r\n                $valid = Auth::validate($credentials);\r\n\r\n                if (!$valid) {\r\n                    return false;\r\n                }\r\n\r\n                return Auth::getProvider()->retrieveByCredentials($credentials)->id;\r\n            }\r\n        ]\r\n    ],\r\n```\r\n\r\nAdded this to my routes.php\r\n\r\n```\r\nRoute::post('oauth/access_token', function() {\r\n    return Response::json(Authorizer::issueAccessToken());\r\n});\r\n```\r\n\r\nThen, I added a row in the `oauth_clients` table like so:\r\n\r\n```\r\n+----+--------+--------+---------------------+---------------------+\r\n| id | secret |  name  |     created_at      |     updated_at      |\r\n+----+--------+--------+---------------------+---------------------+\r\n|  1 |    123 | public | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 |\r\n+----+--------+--------+---------------------+---------------------+\r\n```\r\n\r\nBut everytime I try to login with my credentials through the API, the app throws me the following error:\r\n\r\n```\r\n{\r\n  \"error\": \"invalid_client\",\r\n  \"error_description\": \"Client authentication failed.\"\r\n}\r\n```\r\n\r\nHere you can find the query I am doing:\r\n\r\n![cocoarestclient](http://i.imgur.com/EtMoil7.png \"CocoaRestClient\")\r\n\r\n\r\nPlease, I need help.\r\n\r\nThank you in advance.\r\n"}}