intuit / oauth-jsclient

Intuit's NodeJS OAuth client provides a set of methods to make it easier to work with OAuth2.0 and Open ID
https://developer.intuit.com/
Apache License 2.0
123 stars 159 forks source link

4.1.1 throws TypeError: Converting Circular structure to JSON #164

Closed ianberryman closed 6 months ago

ianberryman commented 6 months ago

Hi, I'm seeing an error in 4.1.1 when calling refreshUsingToken. I only looked briefly but it appears that it might be an issue anytime JSON.stringify(authResponse, ...) is called. Related to https://github.com/intuit/oauth-jsclient/issues/161

TypeError: Converting circular structure to JSON --> starting at object with constructor 'ClientRequest' | property 'socket' -> object with constructor 'TLSSocket' --- property '_httpMessage' closes the circle at JSON.stringify () at ...\node_modules\intuit-oauth\src\OAuthClient.js:274:14

ianberryman commented 6 months ago

I have a production use case for this so I'm going to submit a PR

rajeshgupta723 commented 6 months ago

Thanks @ianberryman , I've merged your PR into master and created this new branch: https://github.com/intuit/oauth-jsclient/tree/release-4.1.2

Please test your changes and overall there. Will be using this branch for the next release 4.1.2 later

ianberryman commented 6 months ago

Thank you

EthanDavis commented 6 months ago

I have this same issue. Are there plans to cut a 4.1.2 release soon?

rajeshgupta723 commented 6 months ago

Hi @EthanDavis please test your use case in this branch release-4.1.2 and confirm everything looks good there. Yes, we will soon release this 4.1.2 branch. Thanks

BogdanPekar commented 6 months ago

Thanks @ianberryman , I've merged your PR into master and created this new branch: https://github.com/intuit/oauth-jsclient/tree/release-4.1.2

Please test your changes and overall there. Will be using this branch for the next release 4.1.2 later

Hi Rajesh,

Could you please advise an approximate date of the new release?

rajeshgupta723 commented 6 months ago

Hi @BogdanPekar @ianberryman @EthanDavis , FYI - Release 4.1.2 has been pushed out, please checkout at https://github.com/intuit/oauth-jsclient/releases

closing this issue. please feel free to reopen this if you still see any issues. Thanks

AliHydr commented 6 months ago

Hi @rajeshgupta723 I'm still facing the same issue

ianberryman commented 6 months ago

@AliHydr Are you using version 4.1.2? I've used both the release branch and the new npm version without issue.