OAuth flow

Indeed. Sorry

On Wed, Sep 24, 2014 at 10:05 AM, Robin Ricard <notifications@github.com>
wrote:

> In lib/handlers/init/callback.js:
>
> > +  return function get(req, res, next) {
> > +    async.waterfall([
> > +      function fetchToken(cb) {
> > +        Anyfetch.getAccessToken(config.appId, config.appSecret, req.query.code, cb);
> > +      },
> > +      function fetchInfos(token, cb) {
> > +        var anyfetchClient = new Anyfetch(token);
> > +        anyfetchClient.batch({
> > +            '/': null,
> > +            '/company': null
> > +          },
> > +          rarity.carry([token], cb)
> > +        );
> > +      },
> > +      function saveToken(token, infos, cb) {
> > +        // TODO: Reach the user id differently (ie. update anyfetch.js)
>
> Yep but it doesn't return company id according to the endpoint
> documentation. I know how to read ...
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/AnyFetch/companion-server/pull/1/files#r17958504>.
>