GoodDollar / GoodIdentity

A decentralized organization that handles Identity verification to its members.
2 stars 0 forks source link

Gun password should be generated from signing plain sentence with private key #12

Open hadarbmdev opened 5 years ago

hadarbmdev commented 5 years ago

On Register.js, The password to gun user creation: ` // Put the user profile + proposal on GunDB const gunuser = global.gun.user() const password = 'password' //TODO: should it be the user private key? If it is stored on gunDb, can we encreypt it?

    gunuser.create(candidate.publicKey,password,async userCreated =>{

`

Should be generated from signing with web3 wallet private key on a sentence like 'Welcome to GoodIdentity'.

Logging in will be then done using to encrypt this plain sentence with the user private key, and comparing the result to the password (or just try to use the generated password to login - if it fails, this was not the user who created the account).