A pain free way to let users login to their wallet on my frontend

At the moment I’m simply using a meta mask login that works only if the user has the extension on their laptop. if they do, an Ethereum object is attached to the window and I can access a user public address.

Now, I want to add that functionality for phone users as well. I know that Moralis offers a Reactbuttoncomponent that lets users login from multiple wallets but:

  • I have never used react
  • my app is not built on react
  • all I want, is for users to click a button, and get back their public address, why does moralis need me to connect to their database or whatever and does it return a public address or does it return an id only?
  • is there a pain free way where I can include through a script tag the moralis SDK, add a button and that’s it, as soon as the user is done I get back into a variable their public address.

Alternatively, does anyone know of any solution that is as easy as how metamask logins works on laptop?

you may need to use wallet connect, you can use on on desktop or mobile, you can use it from vanilla js too, but it may not be super easy to use it, you will have to handle both cases in your code: using metamask and wallet connect

1 Like