OAuth flow

The readme is pretty exhaustive ;-) anyfetch.getCurrentUser

On Wed, Sep 24, 2014 at 10:00 AM, Robin Ricard <notifications@github.com>
wrote:

>> +  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)
> Which one ?
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/AnyFetch/companion-server/pull/1/files#r17958346