How to use intuit-oauth - 3 common examples

To help you get started, we’ve selected a few intuit-oauth examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github intuit / oauth-jsclient / sample / app.js View on Github external
app.get('/disconnect', function(req,res){

  console.log('The disconnect called ');
  const authUri = oauthClient.authorizeUri({scope:[OAuthClient.scopes.OpenId,OAuthClient.scopes.Email],state:'intuit-test'});
  res.redirect(authUri);

});
github intuit / oauth-jsclient / sample / app.js View on Github external
app.get('/getCompanyInfo', function(req,res){


    const companyID = oauthClient.getToken().realmId;

    const url = oauthClient.environment == 'sandbox' ? OAuthClient.environment.sandbox : OAuthClient.environment.production ;

    oauthClient.makeApiCall({url: url + 'v3/company/' + companyID +'/companyinfo/' + companyID})
        .then(function(authResponse){
            console.log("The response for API call is :"+JSON.stringify(authResponse));
            res.send(JSON.parse(authResponse.text()));
        })
        .catch(function(e) {
            console.error(e);
        });
});
github intuit / oauth-jsclient / sample / app.js View on Github external
app.get('/authUri', urlencodedParser, function(req,res) {

    oauthClient = new OAuthClient({
        clientId: req.query.json.clientId,
        clientSecret: req.query.json.clientSecret,
        environment: req.query.json.environment,
        redirectUri: req.query.json.redirectUri
    });

    const authUri = oauthClient.authorizeUri({scope:[OAuthClient.scopes.Accounting],state:'intuit-test'});
    res.send(authUri);
});

intuit-oauth

Intuit Node.js client for OAuth2.0 and OpenIDConnect

Apache-2.0
Latest version published 2 months ago

Package Health Score

84 / 100
Full package analysis

Popular intuit-oauth functions