podio / podio-js

Official Podio JavaScript SDK for node and the browser
http://podio.github.io/podio-js/
MIT License
45 stars 49 forks source link

is authType: 'app' supported? #43

Closed chhuang closed 7 years ago

chhuang commented 8 years ago

Can I use 'app' as authType?

It's not mentioned anywhere in the docs: http://podio.github.io/podio-js/authentication/

Also for the browser implementation, should var PodioJS = require('podio-js'); be var PodioJS = require('podio-js').api;?

rollermy commented 8 years ago

@chhuang, i just set the type of authentication to server and used:

podio.authenticateWithApp(app.id, app.token, function (err) {
    //code here
})

The function is in the library, but not in the documentation. @podio-js Can this be added? Along with how to deal with switching between apps?

chhuang commented 8 years ago

@rollermy yeh that's what I did too. I did set authType to 'app', even though I'm not sure if that makes a difference.

let podio = new Podio.api({ 
  authType: 'app', 
  clientId: PODIO_CLIENT_ID, 
  clientSecret: PODIO_CLIENT_SECRET
});
dmatteo commented 8 years ago

@rollermy PR are very welcome! :hint: :hint: ;)

We're struggling in maintaining the open source SDKs, and a little help on the docs would be very much appreciated :) Related file: https://github.com/podio/podio-js/tree/gh-pages/authentication

dmatteo commented 7 years ago

Documentation updated with app authentication