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

Cookbook Authorize Redirect

Open ssanders opened this issue 11 years ago • 2 comments
trafficstars

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.

ssanders avatar Jul 30 '14 20:07 ssanders

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.

bshaffer avatar Jul 30 '14 20:07 bshaffer

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/

ssanders avatar Jul 31 '14 13:07 ssanders