Do I even need users to sign in to my Dapp if I'm using MetaMask? Or could I just use their public address? Any action they try take in the Dapp will need to be agreed upon by them in any case through MetaMask.


There's no concept of login when running a Dapp, at least not in the traditional sense.

When you are using Metamask you are using an unlocked account and Metamask provides the means to sign the transactions that you perform on the network.

So, in order to interact with a dapp, which would typically base its inner workings by using the account signing the transaction, you don't need to do anything else. If you were able to unlock your account on Metamask, you are "logged in".

There's no additional steps involved in signing a user in. When Metamask is active, browsing to a web3 enabled site will detect the account.

  • Thanks. So why does CryptoKitties have login using Metamask? – Eliezer Steinbock Dec 14 '17 at 13:11
  • You can interact with smart contracts without "logging". A dapp may implement it's own login/sign up on top of that. CryptoKitties has a sign up process to allow you to enter your email and name for email notifications (which is not even done on-chain). If you want an app 100% anonymous, you can do that off the shelf. – pabloruiz55 Dec 14 '17 at 13:23
  • Cool. Thanks a lot for clearing that up! Makes sense – Eliezer Steinbock Dec 14 '17 at 13:30
  • I think it's also used to set your profile name on the site. – Eliezer Steinbock Dec 14 '17 at 13:48
  • In regard to a dApp's front end, that would still have to be hosted on a centralized server right? Edit: A DApp can have frontend code and user interfaces written in any language (just like an app) that can make calls to its backend. Furthermore, its frontend can be hosted on decentralized storage such as Swarm or IPFS – JonathanScialpi May 12 '18 at 23:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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