oauth-io / sdk-php

OAuth that just works ! This is the PHP SDK for OAuth.io
https://oauth.io
86 stars 10 forks source link

On callback URL no JSON field "code" is being returned #10

Open kontur opened 10 years ago

kontur commented 10 years ago

After the redirect at this step:

´´´ $request_object = $oauth->auth('the_provider', array( 'redirect' => true )); ´´´

I get error messages and in investigations I traced the problem to src/OAuth_io/OAuth.php line 148:

$code = $data['data']['code'];

When I dump the parsed JSON there is no field code, but there is access_token. Did the returned encoded JSON change? _I also tried just setting $code to accesstoken to verify, but ran into other complications, so I am asking the maintainers here for more informed input.

kontur commented 10 years ago

Have you had any chance to check this?