From e507e76c62b168b2be78342d719d28381366311b Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 26 Sep 2019 18:09:16 +0000 Subject: [PATCH] --- Controllers/AuthController.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Controllers/AuthController.cs b/Controllers/AuthController.cs index 106fdf4..c62ac88 100644 --- a/Controllers/AuthController.cs +++ b/Controllers/AuthController.cs @@ -61,7 +61,20 @@ namespace qbridge.Controllers } -bugbug: It's not prompting for the company I want like the playground does...what's up with that? Is it because I need to follow the OpenID method rather than the "web app" method?? +//bugbug: It's not prompting for the company I want like the playground does...what's up with that? Is it because I need to follow the OpenID method rather than the "web app" method?? +//realmid is companyid in some examples but I don't get prompted for it unless I use the playground version +//maybe the example I followed assumes you already have the company ID when you make subsequent api calls +/* + +Stuff from playground +Step 1 if I select only openID scope (no company prompt) +https://appcenter.intuit.com/connect/oauth2?client_id=ABj70Wv5gDauFd9KgKFwuvpQjfzTwEgodEG8tnBbS8mSQhNrZJ&scope=openid%20profile%20email%20phone%20address&redirect_uri=https://developer.intuit.com/v2/OAuth2Playground/RedirectUrl&response_type=code&state=PlaygroundAuth + +Step 1 if I select accounting only and not openid scope: +https://appcenter.intuit.com/connect/oauth2?client_id=ABj70Wv5gDauFd9KgKFwuvpQjfzTwEgodEG8tnBbS8mSQhNrZJ&scope=com.intuit.quickbooks.accounting&redirect_uri=https://developer.intuit.com/v2/OAuth2Playground/RedirectUrl&response_type=code&state=PlaygroundAuth + + */ + [HttpGet("Start/{qboid}")] public async Task GetAsync([FromRoute]string qboid) { @@ -93,7 +106,7 @@ bugbug: It's not prompting for the company I want like the playground does...wha var queryParams = new Dictionary() { {"client_id", CLIENT_ID }, - {"scope", "openid" }, + {"scope", "com.intuit.quickbooks.accounting" }, {"redirect_uri",REDIRECT_URI }, {"response_type","code"}, {"state",qboid}