3

I'm building Dapp on Ethereum. The main feature of this Dapp is Register/Login logic. I Don't want to use Metamask, but I want to make Login system like MyEtherWallet without any chrome extention. What's the best way of doing so?

should I use centralized Database? because Dapp won't be decentralized anymore.

4 Answers 4

3

For testing purpose we may use metamask/myetherwallet. But for production system in Dapp we have to manage account and its activites like sign the transaction. Here are common steps to make your Dapp functions well.

  1. Account management : This is fundamental part to interact with contract funcitons. Here is web3.eth.accounts module. this explans The web3.eth.accounts contains functions to generate Ethereum accounts and sign transactions and data. you can do almost all things that you do from metamask.

  2. Network RPC End point : Above accounts must be reside from the same network where and which you have enabled the RPC port.

  3. Dapp Hosting : Ultimately your blockchain is distributed and decentralized but your dapp no need to be distributed and decentralized. You can host any where you can like AWS, Google Cloud. Only you need is private/public key to interact with blockchain. It means that you have to take care of your account and signing mechanism that means keep your private key separate and safe.

Whether you implement your dapp using web3 or native go language or any . The concept is the same.

If you have your separate private key and only you can interact with that key, so there is no such restriction to make decentralization of user interaction with centralized user interface.

4
  • Listen, I don't want to have my Node running, I am building just demo. This demo version should include also mobile (ionic) application, do you have any idea how is this possible? Commented Sep 12, 2018 at 8:28
  • Here is some information ethereum.stackexchange.com/questions/18461/… , I haven't implemented in mobile app but there might be solution. Or you can use web3js and NodeJS as backend and use ionic for interface, it will works fine
    – Gopal ojha
    Commented Sep 12, 2018 at 9:01
  • But how NodeJS server have my private key to make for example sign() function in backend? on website I can connect metemask provider and call sign() function in frontend. Commented Sep 12, 2018 at 9:10
  • If you do not have node running then there is not possible to show the demo. Either you can use testRPC or private network/ test network. And another thing is Your nodejs server will not store anything except your logic. you have to store keystore file and Please see this link this helps to make keystore file and you can store it anywhere but it must be accessable during transaction sining process because you need private key , medium.com/@julien.maffre/… Here is explained all the process of making keystore file.
    – Gopal ojha
    Commented Sep 12, 2018 at 9:22
1

Adding onto Guilherme's answer - I've recently came across a project called Fortmatic

Seems to be another viable solution to handle identity without MetaMask. I just got into the alpha and started playing around with it, and so far so good, very clean and decent docs and integrates well with web3

0

There's a bunch of ways to handle identity without using metamask or any chrome extention, but you'll always be in a sort of "not so decentralized" way, because you'll end up having to build an external database.

You can connect with some idendity provider to handle it for you, I think is the easyest way to do what you want.

I know some providers, if you'd like to give a look at them:

  1. Uport - https://www.uport.me/ uPort returns ownership of identity to the individual. uPort's open identity system allows users to register their own identity on Ethereum, send and request credentials, sign transactions, and securely manage keys & data. Take a look at what we’re building:
  2. Civic - https://www.civic.com/ Civic’s Secure Identity Platform (SIP) uses a verified identity for multi-factor authentication on web and mobile apps without the need for usernames or passwords.
  3. OriginalMy - https://originalmy.com/ Log in to websites without worrying about passwords and never fill out forms again. Use your Blockchain ID to perform various actions on the internet safely, without worrying about fraud.
4
  • I know, you are talking about decentralized identity, but that's not what I need. Imagine I have companies to register in my dapp, I will provide them with their own smart contract and public and private key pair, which they will use to just unlock their account and perform some kind of changes in their smart contract. Commented Sep 11, 2018 at 19:06
  • so how should this account unlock should happen? I just want to make it simple. Maybe I will provide them with ethereum account and just use this account's public and private key? Commented Sep 11, 2018 at 19:09
  • Yea I understood it wrong. Let me think about it. Commented Sep 11, 2018 at 20:42
  • ok, let me know if you have any thoughts. Commented Sep 11, 2018 at 20:49
0

It sounds like you would need a transaction relay systems so that your dapp user would sign transactions and relayer would then execute them on Ethereum. For that you could take a look at https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1077.md and a similar implementation at https://github.com/gnosis/safe-contracts

However the relayers then would be most likely centralized, in principal if we could build a decentralized relay network for all these kind of transactions. But I'm not aware of any ready yet.

P.S: We made an attempt of having a decentralized relay network in a hackathon at https://devpost.com/software/hermes-network and I hope there will be more follow ups of similar projects coming very soon.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.