{"action":"closed","issue":{"url":"https://api.github.com/repos/thephpleague/oauth2-google/issues/22","repository_url":"https://api.github.com/repos/thephpleague/oauth2-google","labels_url":"https://api.github.com/repos/thephpleague/oauth2-google/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/thephpleague/oauth2-google/issues/22/comments","events_url":"https://api.github.com/repos/thephpleague/oauth2-google/issues/22/events","html_url":"https://github.com/thephpleague/oauth2-google/issues/22","id":145615811,"number":22,"title":"Possible typo for \"hostedDomain\" in docs example","user":{"login":"ivarb","id":849042,"avatar_url":"https://avatars.githubusercontent.com/u/849042?v=3","gravatar_id":"","url":"https://api.github.com/users/ivarb","html_url":"https://github.com/ivarb","followers_url":"https://api.github.com/users/ivarb/followers","following_url":"https://api.github.com/users/ivarb/following{/other_user}","gists_url":"https://api.github.com/users/ivarb/gists{/gist_id}","starred_url":"https://api.github.com/users/ivarb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivarb/subscriptions","organizations_url":"https://api.github.com/users/ivarb/orgs","repos_url":"https://api.github.com/users/ivarb/repos","events_url":"https://api.github.com/users/ivarb/events{/privacy}","received_events_url":"https://api.github.com/users/ivarb/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/thephpleague/oauth2-google/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-04T08:18:28Z","updated_at":"2016-04-18T12:48:07Z","closed_at":"2016-04-18T12:48:07Z","body":"Hi,\r\n\r\nI was implementing the Google OAuth2 lib based on the code example provided by the documentation ( https://github.com/thephpleague/oauth2-google#authorization-code-flow). Using just the domain value for the `hostedDomain` parameter resulted in an error returned by Google when my application was invoking the authorization URL:\r\n<img width=\"1781\" alt=\"screen shot 2016-04-04 at 10 05 48\" src=\"https://cloud.githubusercontent.com/assets/849042/14241850/3b4f1c6a-fa4e-11e5-9625-30d2a488b48d.png\">\r\n\r\nUsing a combination of protocol + domain fixed this error for me and resulted in a valid redirect to the configured `redirectUri` directive:\r\n\r\n```php\r\n$provider = new League\\OAuth2\\Client\\Provider\\Google([\r\n    'clientId'     => '{google-app-id}',\r\n    'clientSecret' => '{google-app-secret}',\r\n    'redirectUri'  => 'https://example.com/callback-url',\r\n-    'hostedDomain' => 'example.com',\r\n+    'hostedDomain' => 'https://example.com',\r\n]);\r\n```\r\n\r\n"}}