From 5a167cc45ccd35ab28d4eb70182764b714aa2a98 Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Sun, 28 Jun 2020 00:09:17 -0400 Subject: [PATCH] alternative way of chehcking auth sucess --- services/gunDB/Mediator/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/gunDB/Mediator/index.js b/services/gunDB/Mediator/index.js index 46435035..98bafe55 100644 --- a/services/gunDB/Mediator/index.js +++ b/services/gunDB/Mediator/index.js @@ -1286,7 +1286,7 @@ const register = async (alias, pass) => { if (typeof ack.err === 'string') { 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) _currentAlias = alias _currentPass = await mySEA.encrypt(pass, mySecret)