Skip to content

Instantly share code, notes, and snippets.

@DavidOndrus
Created May 21, 2018 05:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DavidOndrus/460ee8c97331907f8d2e05b024fb97a4 to your computer and use it in GitHub Desktop.
Save DavidOndrus/460ee8c97331907f8d2e05b024fb97a4 to your computer and use it in GitHub Desktop.
waterwheel.js policy
if (req.session.tokenInformation && req.session.tokenExpireTime) {
const config = _.cloneDeep(sails.config.waterwheel);
config.oauth = _.cloneDeep(req.session.tokenInformation);
config.oauth.tokenExpireTime = req.session.tokenExpireTime;
req.waterwheel = new Waterwheel(config);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment