MCPcopy Create free account
hub / github.com/Cv-Keep/cvkeep-backend / validateForgottenPassHash

Function validateForgottenPassHash

functions/user.js:268–280  ·  view source on GitHub ↗
(forgotPassObject)

Source from the content-addressed store, hash-verified

266 },
267
268 validateForgottenPassHash(forgotPassObject) {
269 if (!forgotPassObject) return false;
270
271 const hashAgeInDays = fnUtils.daysSince(forgotPassObject.created);
272 const isHashAllowed = hashAgeInDays <= 2;
273
274 if (!isHashAllowed) {
275 this.removeForgotPass(hash)
276 .catch(error => log('error', error));
277 }
278
279 return isHashAllowed;
280 },
281
282 getForgotPassCompleteData(hash) {
283 return new Promise(async (resolve, reject) => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected