IntuitDeveloper / OAuth2_PHP

PHP sample app for OAuth2
Apache License 2.0
37 stars 34 forks source link

Error: appcenter.intuit.com redirected you too many times #10

Open atikahmd opened 6 years ago

atikahmd commented 6 years ago

Here's my config.php:

<?php return array( 'authorizationRequestUrl' => 'https://appcenter.intuit.com/connect/oauth2', 'tokenEndPointUrl' => 'https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer', 'client_id' => 'Q0xRYbop24Ggh4a04WERTzfhjygqc7aHC8hiQWH1JZr9Fe6Lzl', 'client_secret' => 'Fb1yxxLyinA7opMbyIm6SSmhCUNPOSXXXXXXXXXX', 'oauth_scope' => '.com.intuit.quickbooks.accounting', 'openID_scope' => 'openid profile email', 'oauth_redirect_uri' => 'https://5c0ec91b.ngrok.io/oauth/OAuth_2/OAuth2PHPExample.php', 'openID_redirect_uri' => 'https://5c0ec91b.ngrok.io/oauth/OAuth_2/OAuthOpenIDExample.php', 'mainPage' => 'https://5c0ec91b.ngrok.io/oauth/OAuth_2/index.php', 'refreshTokenPage' => 'https://5c0ec91b.ngrok.io/oauth/OAuth_2/RefreshToken.php', ) ?>

With index.php, these are displayed:

Add the OAuth 2 Consumer Key and OAuth 2 Consumer Secret of your application to config.php file to enable OAuth2 flow.

Add the oauth_redirect_uri to config.php file. This URL is used by Intuit to redirect the user to your page when user authorized your app.

Click on the button below to start "Connect to QuickBooks"

How do I go about this since all the info needed are already provided? The error stated in the title is when I click the "Connect to QuickBooks" button.

hlu2 commented 6 years ago

Check your config file again. It has an extra dot in 'oauth_scope' and one extra comma at the end.