commit
Showing
1 changed file
with
4 additions
and
2 deletions
| ... | @@ -102,10 +102,12 @@ $app->post('/connect', function (Request $request) use ($app, $client) { | ... | @@ -102,10 +102,12 @@ $app->post('/connect', function (Request $request) use ($app, $client) { |
| 102 | // implement this best practice. | 102 | // implement this best practice. |
| 103 | //$app['session']->set('state', ''); | 103 | //$app['session']->set('state', ''); |
| 104 | 104 | ||
| 105 | $code = $request->getContent(); | 105 | $code = $request->getContent(); |
| 106 | // Exchange the OAuth 2.0 authorization code for user credentials. | 106 | // Exchange the OAuth 2.0 authorization code for user credentials. |
| 107 | error_log($client->authenticate($code)); | 107 | $client->authenticate($code); |
| 108 | $token = json_decode($client->getAccessToken()); | 108 | $token = json_decode($client->getAccessToken()); |
| 109 | |||
| 110 | |||
| 109 | $_SESSION['token']= $token; | 111 | $_SESSION['token']= $token; |
| 110 | 112 | ||
| 111 | 113 | ... | ... |
-
Please register or sign in to post a comment