oauth2-server-php-docs icon indicating copy to clipboard operation
oauth2-server-php-docs copied to clipboard

client_id is needed when using an authorization_code

Open bbalet opened this issue 7 years ago • 6 comments

I don't know if it is a bug or a mistake into Cookbook (Step-By-Step Walkthrough), but when you call this one:

curl -u testclient:testpass http://localhost/token.php -d 'grant_type=authorization_code&code=YOUR_CODE'

It fails. I had to repeat the client_id and it worked.

bbalet avatar Mar 25 '17 06:03 bbalet

I could not reproduce OP's issue.

  1. Ran authorized.php in browser gave me back a code
  2. used code in
curl -u testclient:testpass http://walkthrough.local/token.php -d 'grant_type=authorization_code&code=[CODE]'
  1. gave me back a token.

alpha1125 avatar Jul 11 '17 11:07 alpha1125

How many clients into your db?

bbalet avatar Jul 11 '17 11:07 bbalet

only 1... I was testing it out, haven't used in in more than one scenario now... I'll test out more clients.

alpha1125 avatar Jul 11 '17 14:07 alpha1125

Is this still an issue?

bluebaroncanada avatar Aug 14 '17 13:08 bluebaroncanada

Yes I'm very curious if this was resolved. It could be the apache headers issue (documented here).

bshaffer avatar Dec 01 '17 00:12 bshaffer

Could it be that you have the OAuth2\OpenID\GrantType\AuthorizationCode grant type instead of OAuth2\GrantType\AuthorizationCode?

ghost avatar Feb 16 '18 10:02 ghost