This commit is contained in:
@@ -1,12 +1,9 @@
|
||||
using System;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Net.Http;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using System.Net.Http.Formatting;
|
||||
|
||||
namespace qbridge.Controllers
|
||||
{
|
||||
@@ -128,7 +125,7 @@ namespace qbridge.Controllers
|
||||
// Redirect endpoint
|
||||
//Step 4 here: https://developer.intuit.com/app/developer/qbo/docs/develop/authentication-and-authorization/openid-connect
|
||||
[HttpGet("redirect")]
|
||||
public async Task<IActionResult> GetAsync([FromQuery]string state, [FromQuery]string code, [FromQuery]string realmId)
|
||||
public async Task<IActionResult> GetAsync([FromQuery] string state, [FromQuery]string code, [FromQuery]string realmId)
|
||||
{
|
||||
//NOTE: state is our own state provided in the initial auth redirect
|
||||
//code is authorization code used to then get the refresh and access token
|
||||
@@ -194,7 +191,8 @@ namespace qbridge.Controllers
|
||||
refresh_token = refresh_token,
|
||||
x_refresh_token_expires_in = x_refresh_token_expires_in,
|
||||
realmId = realmId,
|
||||
code = code
|
||||
code = code,
|
||||
state = state
|
||||
});
|
||||
//return Content($"ACCESS TOKEN: {access_token}, REFRESH TOKEN: {refresh_token}, REALM:{realmId}, STATE:{state}, CODE:{code}");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user