{"action":"created","issue":{"url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/issues/572","labels_url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/issues/572/labels{/name}","comments_url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/issues/572/comments","events_url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/issues/572/events","html_url":"https://github.com/lucadegasperi/oauth2-server-laravel/issues/572","id":111235108,"number":572,"title":"Authorization grant flow error in get Method.","user":{"login":"maxpinto","id":5222453,"avatar_url":"https://avatars.githubusercontent.com/u/5222453?v=3","gravatar_id":"","url":"https://api.github.com/users/maxpinto","html_url":"https://github.com/maxpinto","followers_url":"https://api.github.com/users/maxpinto/followers","following_url":"https://api.github.com/users/maxpinto/following{/other_user}","gists_url":"https://api.github.com/users/maxpinto/gists{/gist_id}","starred_url":"https://api.github.com/users/maxpinto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxpinto/subscriptions","organizations_url":"https://api.github.com/users/maxpinto/orgs","repos_url":"https://api.github.com/users/maxpinto/repos","events_url":"https://api.github.com/users/maxpinto/events{/privacy}","received_events_url":"https://api.github.com/users/maxpinto/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/labels/support","name":"support","color":"fad8c7"}],"state":"closed","locked":false,"assignee":{"login":"lucadegasperi","id":820687,"avatar_url":"https://avatars.githubusercontent.com/u/820687?v=3","gravatar_id":"","url":"https://api.github.com/users/lucadegasperi","html_url":"https://github.com/lucadegasperi","followers_url":"https://api.github.com/users/lucadegasperi/followers","following_url":"https://api.github.com/users/lucadegasperi/following{/other_user}","gists_url":"https://api.github.com/users/lucadegasperi/gists{/gist_id}","starred_url":"https://api.github.com/users/lucadegasperi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucadegasperi/subscriptions","organizations_url":"https://api.github.com/users/lucadegasperi/orgs","repos_url":"https://api.github.com/users/lucadegasperi/repos","events_url":"https://api.github.com/users/lucadegasperi/events{/privacy}","received_events_url":"https://api.github.com/users/lucadegasperi/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-10-13T18:00:06Z","updated_at":"2015-12-01T10:11:41Z","closed_at":"2015-11-03T08:16:46Z","body":"hi, i am trying to use the Authorization code grant flow, but always returns invalid cliente credentials, this is what i am doing:\r\n\r\nIn my routes.php i have added this:\r\n\r\n     Route::group(['prefix' => 'thirdParty','middleware' => ['csrf', 'check-authorization-params', 'auth']],\r\n     function() {\r\n     Route::get('oauth/authorize', ['as' => 'oauth.authorize.get', function() {\r\n        // display a form where the user can authorize the client to access it's data\r\n        return \"hola\";\r\n        $authParams = Authorizer::getAuthCodeRequestParams();\r\n        $formParams = array_except($authParams,'client');\r\n        $formParams['client_id'] = $authParams['client']->getId();\r\n        return View::make('oauth.authorization-form', ['params'=>$formParams,'client'=>$authParams['client']]);\r\n    }]);\r\n    \r\n    Route::post('oauth/authorize', ['as' => 'oauth.authorize.post', function() {\r\n        $params = Authorizer::getAuthCodeRequestParams();\r\n        $params['user_id'] = Auth::user()->id;\r\n        $redirectUri = '';\r\n        // if the user has allowed the client to access its data, redirect back to the client with an auth code\r\n        if (Input::get('approve') !== null) {\r\n            $redirectUri = Authorizer::issueAuthCode('user', $params['user_id'], $params);\r\n        }\r\n        // if the user has denied the client to access its data, redirect back to the client with an error message\r\n        if (Input::get('deny') !== null) {\r\n            $redirectUri = Authorizer::authCodeRequestDeniedRedirectUri();\r\n        }\r\n        return Redirect::to($redirectUri);\r\n    }]);\r\n    });` \r\n\r\nI have added the Auth Code Grant Credentials y grant type (oauth2.php).\r\nI am logged, so the filter auth is passed.\r\nI have added the client and client end point\r\n\r\n     insert into laravel5.oauth_client_endpoints values (2,'cliente1','http://www.mysite.com',null,null);\r\n     insert into laravel5.oauth_clients values('cliente1','secret','testclient',null,null);\r\n\r\n\r\nAnd considering the specifications i have done all, so when i try to get the authorization code, making the get method, such as:\r\n\r\n\r\nhttp://dev.laravel5.local/thirdParty/oauth/authorize?client_id=cliente1&redirect_uri=https://www.mysite.com&response_type=code\r\n\r\nIts always returns:\r\n    {\"error\":\"invalid_client\",\"error_description\":\"Client authentication failed.\"}\r\n\r\n\r\nAnd repeat i have success logged in.\r\n\r\n\r\nWhats could be my problema?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/issues/comments/160924126","html_url":"https://github.com/lucadegasperi/oauth2-server-laravel/issues/572#issuecomment-160924126","issue_url":"https://api.github.com/repos/lucadegasperi/oauth2-server-laravel/issues/572","id":160924126,"user":{"login":"Eanghort","id":5179213,"avatar_url":"https://avatars.githubusercontent.com/u/5179213?v=3","gravatar_id":"","url":"https://api.github.com/users/Eanghort","html_url":"https://github.com/Eanghort","followers_url":"https://api.github.com/users/Eanghort/followers","following_url":"https://api.github.com/users/Eanghort/following{/other_user}","gists_url":"https://api.github.com/users/Eanghort/gists{/gist_id}","starred_url":"https://api.github.com/users/Eanghort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eanghort/subscriptions","organizations_url":"https://api.github.com/users/Eanghort/orgs","repos_url":"https://api.github.com/users/Eanghort/repos","events_url":"https://api.github.com/users/Eanghort/events{/privacy}","received_events_url":"https://api.github.com/users/Eanghort/received_events","type":"User","site_admin":false},"created_at":"2015-12-01T10:11:41Z","updated_at":"2015-12-01T10:11:41Z","body":"I encountered this issue in Laravel 5.1 too. Could you tell me how to resolve this problem?"}}