oauth2-server-php-docs
oauth2-server-php-docs copied to clipboard
Cookbook Authorize Redirect
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.
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.
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/