We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I run this code it complains that there is no callback URL -- which is correct.
This line is missing:
$client->setRedirectUri('SomeDomain/oauth2callback.php');
The second problem is there is no "quickstart" code to handle the callback.
To work
Fails because the code is broken
PHP Fatal error: Uncaught InvalidArgumentException: missing the required redirect URI in /home/.../public_html/gclassroom/vendor/google/auth/src/OAuth2.php:675 Stack trace: #0 /home/.../public_html/gclassroom/vendor/google/apiclient/src/Client.php(396): Google\Auth\OAuth2->buildFullAuthorizationUri(Array) #1 /home/.../public_html/gclassroom/test.php(48): Google\Client->createAuthUrl() #2 /home/.../public_html/gclassroom/test.php(73): getClient() #3 {main} thrown in /home/.../public_html/gclassroom/vendor/google/auth/src/OAuth2.php on line 675
php test.php
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When I run this code it complains that there is no callback URL -- which is correct.
This line is missing:
$client->setRedirectUri('SomeDomain/oauth2callback.php');
The second problem is there is no "quickstart" code to handle the callback.
Expected Behavior
To work
Actual Behavior
Fails because the code is broken
PHP Fatal error: Uncaught InvalidArgumentException: missing the required redirect URI in /home/.../public_html/gclassroom/vendor/google/auth/src/OAuth2.php:675
Stack trace:
#0 /home/.../public_html/gclassroom/vendor/google/apiclient/src/Client.php(396): Google\Auth\OAuth2->buildFullAuthorizationUri(Array)
#1 /home/.../public_html/gclassroom/test.php(48): Google\Client->createAuthUrl()
#2 /home/.../public_html/gclassroom/test.php(73): getClient()
#3 {main}
thrown in /home/.../public_html/gclassroom/vendor/google/auth/src/OAuth2.php on line 675
Steps to Reproduce the Problem
php test.php
Specifications
The text was updated successfully, but these errors were encountered: