Merge pull request #100 from shocknet/bug/create-broken

alternative way of chehcking auth sucess
This commit is contained in:
Daniel Lugo 2020-06-28 00:10:35 -04:00 committed by GitHub
commit 7ccb642aff

View file

@ -1286,7 +1286,7 @@ const register = async (alias, pass) => {
if (typeof ack.err === 'string') { if (typeof ack.err === 'string') {
throw new Error(ack.err) throw new Error(ack.err)
} else if (typeof ack.pub === 'string') { } else if (typeof ack.pub === 'string' || typeof user._.sea === 'object') {
const mySecret = await mySEA.secret(user._.sea.epub, user._.sea) const mySecret = await mySEA.secret(user._.sea.epub, user._.sea)
_currentAlias = alias _currentAlias = alias
_currentPass = await mySEA.encrypt(pass, mySecret) _currentPass = await mySEA.encrypt(pass, mySecret)