Open vitalyster opened 5 years ago
Using vk.com as OAuth2 provider:
[Tue Dec 18 05:33:58 2018] [debug] HttpClient: url=https://oauth.vk.com/access_token [Tue Dec 18 05:33:58 2018] [debug] HttpClient: headers=array ( 0 => 'Content-type: application/x-www-form-urlencoded', 1 => 'Accept: application/json', ) [Tue Dec 18 05:33:58 2018] [debug] HttpClient: payload=code=xxxx&client_id=yyyyy&client_secret=zzzzz&redirect_uri=https%3A%2F%2Faaaa.com%2F%3Fcontroller%3DOAuthController%26action%3Dhandler%26plugin%3DOAuth2&grant_type=authorization_code&state=12294378d4c4cf2fcdebd2eeecc5df8c86f9a94d9244a39ccbe6089d5265 [Tue Dec 18 05:33:58 2018] [debug] HttpClient: metadata=array ( 'crypto' => array ( 'protocol' => 'TLSv1.2', 'cipher_name' => 'ECDHE-RSA-AES256-GCM-SHA384', 'cipher_bits' => 256, 'cipher_version' => 'TLSv1.2', ), 'timed_out' => false, 'blocked' => true, 'eof' => true, 'wrapper_data' => array ( 0 => 'HTTP/1.1 200 OK', 1 => 'Server: Internet Information Services', 2 => 'Date: Tue, 18 Dec 2018 10:33:58 GMT', 3 => 'Content-Type: application/json; charset=utf-8', 4 => 'Content-Length: 143', 5 => 'Connection: close', 6 => 'X-Powered-By: PHP/3.17748', 7 => 'Set-Cookie: remixlang=61; expires=Thu, 19 Dec 2019 17:39:18 GMT; path=/; domain=.vk.com', 8 => 'Cache-control: no-store', 9 => 'Strict-Transport-Security: max-age=15768000', ), 'wrapper_type' => 'http', 'stream_type' => 'tcp_socket/ssl', 'mode' => 'r', 'unread_bytes' => 0, 'seekable' => false, 'uri' => 'https://oauth.vk.com/access_token', ) [Tue Dec 18 05:33:58 2018] [debug] HttpClient: body={"access_token":"64bde7b4f8c7ed94fab71630961d8072fb21d41a3b2931d13c9d83497c0151e2cd541db694488ebe1734f","expires_in":86399,"user_id":bbbbbb} [Tue Dec 18 05:33:58 2018] [debug] HttpClient: executionTime=0.35798001289368 [Tue Dec 18 05:33:58 2018] [debug] Kanboard\Plugin\OAuth2\Auth\GenericOAuth2Provider::getProfile: Got access token: Yes [Tue Dec 18 05:33:58 2018] [debug] Kanboard\Plugin\OAuth2\Auth\GenericOAuth2Provider::getProfile: Fetch user profile from https://api.vk.com/method/users.get?fields=screen_name,id,email&v=5.73 [Tue Dec 18 05:33:58 2018] [debug] HttpClient: url=https://api.vk.com/method/users.get?fields=screen_name,id,email&v=5.73 [Tue Dec 18 05:33:58 2018] [debug] HttpClient: headers=array ( 0 => 'Accept: application/json', 1 => '', ) [Tue Dec 18 05:33:58 2018] [debug] HttpClient: payload= [Tue Dec 18 05:33:58 2018] [debug] HttpClient: metadata=array ( 'crypto' => array ( 'protocol' => 'TLSv1.2', 'cipher_name' => 'ECDHE-ECDSA-AES128-GCM-SHA256', 'cipher_bits' => 128, 'cipher_version' => 'TLSv1.2', ), 'timed_out' => false, 'blocked' => true, 'eof' => true, 'wrapper_data' => array ( 0 => 'HTTP/1.1 200 OK', 1 => 'Server: Internet Information Services', 2 => 'Date: Tue, 18 Dec 2018 10:33:58 GMT', 3 => 'Content-Type: application/json; charset=utf-8', 4 => 'Content-Length: 250', 5 => 'Connection: close', 6 => 'X-Powered-By: PHP/3.17748', 7 => 'Cache-control: no-store', ), 'wrapper_type' => 'http', 'stream_type' => 'tcp_socket/ssl', 'mode' => 'r', 'unread_bytes' => 0, 'seekable' => false, 'uri' => 'https://api.vk.com/method/users.get?fields=screen_name,id,email&v=5.73', ) [Tue Dec 18 05:33:58 2018] [debug] HttpClient: body={"error":{"error_code":5,"error_msg":"User authorization failed: no access_token passed.","request_params":[{"key":"oauth","value":"1"},{"key":"method","value":"users.get"},{"key":"fields","value":"screen_name,id,email"},{"key":"v","value":"5.73"}]}}
@vitalyster I've faced the same problem. Have you solved it?
Okey, I solved this problem here https://github.com/tyommik/kanboard-auth-plugin-vk
Using vk.com as OAuth2 provider: