I want to apply gun.user
in my project.
When I store the user in sessionStorage using user.recall(opt)
,
This code in sea.js stores password in tmp
without encryption.
Is it okay? or..
Should I encrypt password before calling .auth
?
Here is my code.
jq('#up').on('click', (e) => {
let form = check();
if(!form){ return }
S.user.create(form.alias, form.pass, (ack) => {
if(ack.err){ return S.tell(ack.err) }
check.up = true;
S.user.auth(form.alias, form.pass, logined);
});
});
jq('#in').on('click', (e) => {
let form = check();
if(!form){ return }
S.user.auth(form.alias, form.pass, logined);
});
let logined = (ack) =>{
if(ack.err){ return S.tell(ack.err) }
S.user.recall({sessionStorage: true});
}
+
I found the document about user.create()
.
Passphrase that will be extended with PBKDF2 to make it a secure way to login.
However, there is plane text in my session storage.
gun version is 0.2019.515.