SEA User.auth test cases done & bug fixed

This commit is contained in:
Mika Helander 2017-08-29 23:55:24 +03:00
parent b74a0268d0
commit 68f5725899
2 changed files with 8375 additions and 8313 deletions

6
sea.js
View File

@ -140,7 +140,7 @@
root.get(key).get(function(at, ev){
key = key.slice(4);
ev.off();
if(!at.put){ return reject({err: 'Public key does not exist!'}) }
if(!at.put){return}
// attempt to PBKDF2 extend the password with the salt. (Verifying the signature gives us the plain text salt.)
SEA.read(at.put.salt, key).then(function(salt){
return SEA.proof(pass, salt);
@ -198,10 +198,14 @@
return;
}
// Or else we failed to log in...
}).catch(function(e){
Gun.log('Failed to sign in!');
reject({err: 'Attempt failed'});
});
});
// if (!found) {
// reject({err: 'Public key does not exist!'})
// }
});
});
};

File diff suppressed because it is too large Load Diff