MCPcopy
hub / github.com/parse-community/parse-server / verifyPassword

Function verifyPassword

spec/VerifyUserPassword.spec.js:6–18  ·  view source on GitHub ↗
(login, password, isEmail = false)

Source from the content-addressed store, hash-verified

4const MockEmailAdapterWithOptions = require('./support/MockEmailAdapterWithOptions');
5
6const verifyPassword = function (login, password, isEmail = false) {
7 const body = !isEmail ? { username: login, password } : { email: login, password };
8 return request({
9 url: Parse.serverURL + '/verifyPassword',
10 headers: {
11 'X-Parse-Application-Id': Parse.applicationId,
12 'X-Parse-REST-API-Key': 'rest',
13 },
14 qs: body,
15 })
16 .then(res => res)
17 .catch(err => err);
18};
19
20const isAccountLockoutError = function (username, password, duration, waitTime) {
21 return new Promise((resolve, reject) => {

Callers 1

Calls 1

requestFunction · 0.50

Tested by

no test coverage detected