Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@hapi/hapi": "^19.0.5",
"@hapi/vision": "^6.0.0",
"@microfleet/core": "^16.0.1",
"@microfleet/transport-amqp": "^15.1.4",
"@microfleet/transport-amqp": "^15.2.0",
"@microfleet/validation": "^8.1.2",
"bluebird": "^3.7.2",
"bytes": "^3.0.0",
Expand Down Expand Up @@ -72,38 +72,38 @@
"zxcvbn": "^4.4.2"
},
"devDependencies": {
"@babel/cli": "^7.8.3",
"@babel/core": "^7.8.3",
"@babel/cli": "^7.8.4",
"@babel/core": "^7.8.4",
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-proposal-object-rest-spread": "^7.8.3",
"@babel/plugin-transform-strict-mode": "^7.8.3",
"@babel/register": "^7.8.3",
"@makeomatic/deploy": "^10.0.1",
"@semantic-release/changelog": "^3.0.6",
"@semantic-release/exec": "^4.0.0",
"@semantic-release/git": "^8.0.0",
"@makeomatic/deploy": "^10.1.1",
"@semantic-release/changelog": "^5.0.0",
"@semantic-release/exec": "^5.0.0",
"@semantic-release/git": "^9.0.0",
"apidoc": "^0.20.0",
"apidoc-plugin-schema": "^0.1.8",
"babel-eslint": "^10.0.3",
"babel-plugin-istanbul": "^6.0.0",
"chai": "^4.2.0",
"cheerio": "^1.0.0-rc.3",
"codecov": "^3.6.2",
"cross-env": "^6.0.3",
"codecov": "^3.6.4",
"cross-env": "^7.0.0",
"eslint": "^6.8.0",
"eslint-config-makeomatic": "^4.0.0",
"eslint-plugin-import": "^2.20.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-mocha": "^6.2.2",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-unicorn": "^15.0.1",
"eslint-plugin-unicorn": "^16.0.0",
"faker": "^4.1.0",
"glob": "^7.1.6",
"json": "^9.0.6",
"md5": "^2.2.1",
"mocha": "^7.0.0",
"mocha": "^7.0.1",
"nyc": "^15.0.0",
"puppeteer": "2.0.0",
"rimraf": "^3.0.0",
"rimraf": "^3.0.1",
"sinon": "^8.1.1"
},
"engines": {
Expand Down
1 change: 0 additions & 1 deletion src/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ class Users extends Microfleet {
const tokenManagerOpts = { backend: { connection: redis } };
const tmOpts = merge({}, config.tokenManager, tokenManagerOpts);

this.log.debug({ tmOpts }, 'init token manager');
this.tokenManager = new TokenManager(tmOpts);
});

Expand Down
2 changes: 1 addition & 1 deletion src/utils/challenges/challenge.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async function generateChallenge(type, opts, ctx = {}, wait = false) {
ctx.token = token;
} catch (error) {
if (error.message === '429') {
const duration = moment().add(opts.ttl, 'seconds').toNow(true);
const duration = moment().add(opts.throttle, 'seconds').toNow(true);
const msg = `We've already sent you an email, if it doesn't come - please try again in ${duration} or send us an email`;
throw new HttpStatusError(429, msg);
}
Expand Down
4 changes: 2 additions & 2 deletions test/helpers/oauth/facebook/web-executer.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ class WebExecuter {
await page.waitForSelector('#platformDialogForm a[id]', { visible: true });
await page.screenshot({ fullPage: true, path: `./ss/sandnav-initial-${Date.now()}.png` });
await page.click('#platformDialogForm a[id]', { delay: 100 });
await Promise.delay(300);
await Promise.delay(500);
await page.screenshot({ fullPage: true, path: `./ss/sandnav-before-${Date.now()}.png` });
await page.waitForSelector(`#platformDialogForm label:nth-child(${permissionIndex})`, { visible: true });
await page.click(`#platformDialogForm label:nth-child(${permissionIndex})`, { delay: 100 });
await Promise.delay(300);
await Promise.delay(500);
await page.screenshot({ fullPage: true, path: `./ss/sandnav-after-${Date.now()}.png` });
await page.waitForSelector('button[name=__CONFIRM__]', { visible: true });
await page.click('button[name=__CONFIRM__]', { delay: 100 });
Expand Down
4 changes: 2 additions & 2 deletions test/suites/actions/challenge.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ describe('#challenge', function challengeSuite() {
});

it('must fail to send challenge email more than once in an hour per user', async () => {
const msg = 'We\'ve already sent you an email, if it doesn\'t come - please try again in 4 hours or send us an email';
const msg = 'We\'ve already sent you an email, if it doesn\'t come - please try again in 2 hours or send us an email';

await requestChallenge();
const secondRequest = requestChallenge();
Expand All @@ -73,7 +73,7 @@ describe('#challenge', function challengeSuite() {
});

it('must fail to send challeng email during race condition', async () => {
const msg = 'We\'ve already sent you an email, if it doesn\'t come - please try again in 4 hours or send us an email';
const msg = 'We\'ve already sent you an email, if it doesn\'t come - please try again in 2 hours or send us an email';
const raceRequest = Promise.all([requestChallenge(), requestChallenge(), requestChallenge()]);

await assert.rejects(raceRequest, {
Expand Down
Loading