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
121 stars 156 forks source link

Why does sample use global instance of OAuthClient? #61

Closed jlc467 closed 4 years ago

jlc467 commented 4 years ago

All of the sample code seems to revolve around a single company integration. Who is building integrations for a single company? Far more common is an integration designed to work with multiple companies. This was brought up here: https://github.com/intuit/oauth-jsclient/issues/1

Not sure why the sample code / documentation is built for a very uncommon use case.

abisalehalliprasan commented 4 years ago

@jlc467 : The library is an OAuth client library and not a full-blown SDK.

When we designed this initially, we did expose helper methods to get/set the tokens associated with multiple companies, so that we could use just one instance of OAuthClient.