Skip to content
This repository has been archived by the owner on Sep 3, 2020. It is now read-only.

Installation on popular cloud servers invalidates Questtrade key #1

Closed
jonathanbell opened this issue Feb 21, 2018 · 0 comments
Closed
Assignees

Comments

@jonathanbell
Copy link
Owner

The Questrade package writes the Questrade key to disk on the file system for data storage:

Questrade.prototype._saveKey = function (cb) {
  cb = cb || function(){};
  var self = this;
  fs.writeFile(self._getKeyFile(), self.refreshToken, 'utf8', function (err) {
    if (err) return cb({ message: 'failed_to_write', details: err });
    cb(null, self.refreshToken);
  });
}

If running on a service like Heroku with an ephemeral file system, the data will not persist and the API key will not be valid. TODO: Write the temp key to a database and retrieve it when requested by the Questrade package.

@jonathanbell jonathanbell self-assigned this Feb 21, 2018
@jonathanbell jonathanbell changed the title Installation on popular cloud servers invalidate Questtrade key Installation on popular cloud servers invalidates Questtrade key May 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant