bshaffer / oauth2-server-php-docs

documentation for the oauth2-server-php library
231 stars 148 forks source link

Cookbook Authorize Redirect #41

Open ssanders opened 10 years ago

ssanders commented 10 years ago

http://localhost/authorize.php?response_type=code&client_id=testclient&state=xyz must include &redirect_uri= plus a URL.

If not, and you set redirect_uri in oauth_clients, you get this fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'redirect_uri' cannot be null'.

See also https://github.com/bshaffer/oauth2-server-php/issues/163.

bshaffer commented 10 years ago

I see, so the change implemented in the issue above just needs to be implemented for oauth_clients:redirect_uri as well. Easy enough!

Thank you for finding this.

ssanders commented 10 years ago

No problem. You also need it when you call token.php: curl -u testclient:testpass http://localhost/token.php -d 'grant_type=authorization_code&code=YOUR_CODE%redirect_url=http://fake/