Skip to content

Authentication

viestursr edited this page Dec 22, 2017 · 1 revision

User authentication is performed using Laravel standard authentication flow. Current approach is aimed to make wallet creation for authors and readers as seamless as possible, thus, on user creation we generate random password which is used to unlock users wallet. Wallet creation is handled by the BlockchainManager.createWallet(password, callback) function, which is our wrapper to Web3.js newAccount(password, callback) function. Wallet address is then stored under user document and used in code.

While physically author and reader registration is separate, the underlying technology for both of these is the same.

For now the wallet generation happens on the client side and we are well aware of the fact, that this is far from secure. We also expose wallet password on the client side in order to call the account creation function.