Skip to content
New issue

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

classroom/quickstart/quickstart.php missing code #71

Closed
emerika opened this issue Dec 8, 2020 · 0 comments
Closed

classroom/quickstart/quickstart.php missing code #71

emerika opened this issue Dec 8, 2020 · 0 comments

Comments

@emerika
Copy link

emerika commented Dec 8, 2020

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

  • PHP 7.3
  • OS Linux
@emerika emerika closed this as completed Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant