{"action":"created","issue":{"url":"https://api.github.com/repos/adamwathan/eloquent-oauth-l5/issues/32","repository_url":"https://api.github.com/repos/adamwathan/eloquent-oauth-l5","labels_url":"https://api.github.com/repos/adamwathan/eloquent-oauth-l5/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/adamwathan/eloquent-oauth-l5/issues/32/comments","events_url":"https://api.github.com/repos/adamwathan/eloquent-oauth-l5/issues/32/events","html_url":"https://github.com/adamwathan/eloquent-oauth-l5/issues/32","id":128397803,"number":32,"title":"Logging giving me error on InvalidAuthorizationCode","user":{"login":"cskiwi","id":847540,"avatar_url":"https://avatars.githubusercontent.com/u/847540?v=3","gravatar_id":"","url":"https://api.github.com/users/cskiwi","html_url":"https://github.com/cskiwi","followers_url":"https://api.github.com/users/cskiwi/followers","following_url":"https://api.github.com/users/cskiwi/following{/other_user}","gists_url":"https://api.github.com/users/cskiwi/gists{/gist_id}","starred_url":"https://api.github.com/users/cskiwi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cskiwi/subscriptions","organizations_url":"https://api.github.com/users/cskiwi/orgs","repos_url":"https://api.github.com/users/cskiwi/repos","events_url":"https://api.github.com/users/cskiwi/events{/privacy}","received_events_url":"https://api.github.com/users/cskiwi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-01-24T13:41:17Z","updated_at":"2016-11-09T23:45:37Z","closed_at":null,"body":"Hi,\n\nWhen trying to login with a user I get the following error:\n![image](https://cloud.githubusercontent.com/assets/847540/12536540/8c83175e-c2a8-11e5-8baa-ed0e4cec02e8.png)\n\nthis is the code I'm using:\n\n``` php\nRoute::get('auth/authorize/{provider}',  function($provider) {\n        return SocialAuth::authorize($provider);\n    });\n    Route::get('auth/login/{provider}',  function($provider) {\n        try {\n            SocialAuth::login($provider, function($user, $details) {\n                $user->username = $details->nickname;\n                $user->name = $details->full_name;\n                $user->save();\n            });\n        } catch (ApplicationRejectedException $e) {\n            // User rejected application\n            dd('error1');\n        } catch (InvalidAuthorizationCodeException $e) {\n            // Authorization was attempted with invalid\n            // code,likely forgery attempt\n            print_r($provider);\n            dd($e);\n        }\n\n        // Current user is now available via Auth facade\n        $user = Auth::user();\n        dd($user);\n\n        return $user;\n    });\n```\n\nand the follwing is in my `config/eloquent-oauth.php`\n\n``` php\n<?php\n\nuse App\\User;\n\nreturn [\n    'model' => User::class,\n    'table' => 'oauth_identities',\n    'providers' => [\n        'facebook' => [\n            'client_id' => env('FACEBOOK_CLIENT_ID'),\n            'client_secret' => env('FACEBOOK_CLIENT_SECRET'),\n            'redirect_uri' => 'http://portal.latomme-g.be/api/v1/auth/login/facebook',\n            'scope' => [],\n        ],\n        'google' => [\n            'client_id' => env('GOOGLE_CLIENT_ID'),\n            'client_secret' => env('GOOGLE_CLIENT_SECRET'),\n            'redirect_uri' => 'http://portal.latomme-g.be/api/v1/auth/login/google',\n            'scope' => [],\n        ],\n        'github' => [\n            'client_id' => env('GITHUB_CLIENT_ID'),\n            'client_secret' => env('GITHUB_CLIENT_SECRET'),\n            'redirect_uri' => 'http://portal.latomme-g.be/api/v1/auth/login/github',\n            'scope' => [],\n        ],\n        'linkedin' => [\n            'client_id' => '12345678',\n            'client_secret' => 'y0ur53cr374ppk3y',\n            'redirect_uri' => 'https://example.com/your/linkedin/redirect',\n            'scope' => [],\n        ],\n        'instagram' => [\n            'client_id' => '12345678',\n            'client_secret' => 'y0ur53cr374ppk3y',\n            'redirect_uri' => 'https://example.com/your/instagram/redirect',\n            'scope' => [],\n        ],\n        'soundcloud' => [\n            'client_id' => '12345678',\n            'client_secret' => 'y0ur53cr374ppk3y',\n            'redirect_uri' => 'https://example.com/your/soundcloud/redirect',\n            'scope' => [],\n        ],\n    ],\n];\n\n```\n\nThis problem exists for me for; Facebook, Google and Github (others I didn't try)\n"},"comment":{"url":"https://api.github.com/repos/adamwathan/eloquent-oauth-l5/issues/comments/259559873","html_url":"https://github.com/adamwathan/eloquent-oauth-l5/issues/32#issuecomment-259559873","issue_url":"https://api.github.com/repos/adamwathan/eloquent-oauth-l5/issues/32","id":259559873,"user":{"login":"adamwathan","id":4323180,"avatar_url":"https://avatars.githubusercontent.com/u/4323180?v=3","gravatar_id":"","url":"https://api.github.com/users/adamwathan","html_url":"https://github.com/adamwathan","followers_url":"https://api.github.com/users/adamwathan/followers","following_url":"https://api.github.com/users/adamwathan/following{/other_user}","gists_url":"https://api.github.com/users/adamwathan/gists{/gist_id}","starred_url":"https://api.github.com/users/adamwathan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamwathan/subscriptions","organizations_url":"https://api.github.com/users/adamwathan/orgs","repos_url":"https://api.github.com/users/adamwathan/repos","events_url":"https://api.github.com/users/adamwathan/events{/privacy}","received_events_url":"https://api.github.com/users/adamwathan/received_events","type":"User","site_admin":false},"created_at":"2016-11-09T23:45:37Z","updated_at":"2016-11-09T23:45:37Z","body":"Don't personally have time to try and debug this at the moment, so if anyone is willing to look into it figure out what's happening, I'm happy to look at PRs."}}
{"actor":{"display_login":"adamwathan"}}