Moralis support for Custodial Wallets App

Hi,

I am trying to build a simple app using HTML/CSS and javascript with sign up / login functions. I am using Moralis javascript library. I would like my clients / users to be able to login with their username and passwords instead of meta mask wallet (which comes behind the scenes of Moralis,authenticate). This is because a lot of community does not have meta mask or non custodial wallets.

Any help in this regard would be super useful.

Thanks.

Hey,

You can check out the example over here that helps in you in this regard-

https://docs.moralis.io/moralis-server/users/email-login

1 Like

Many thanks Malik, This is very useful as far as the front end to the user is concerned. The username / email and password are saved in the Moralis Mongo DB which is great too. I believe the next step for me would be to link them up with some sort of custodial wallets so that the authentication mechanics are still based on private key encryption and the out of the box features of the wallet to be able to interact with block chains and similarly the smart apps running on the block chain can also make use of the wallet.

Do you know another resource that would allow me to create custodial wallets on behalf of these “signed up” users using their username and password from the Moralis DB?

Any help would be great. Thanks.

What do you mean by custodial wallet? you can use MetaMask

Actually I cannot ask each of my users to have a metamask wallet and have their private key stored with them therefore I need to have a mechanism where the users created after sign up have wallets created on some authority who looks after them which means the private keys of the users are in their custody hence the custodial wallets. Examples are Exodous, Coinbase. I wondered if there is a way to create those wallets programmatically once the sign up happens.

Then those wallets can be used to store important information about the users.

Hope that makes sense.

It doesn’t completely make sense, because if you create those wallets then you have access to those wallets and in that case you’ll be the one that will have to take care of all the security related to those wallets.

Custodial wallet will not be managed by me but a service provider. Just like Moralis for example stores users and manages all the security (makes sense ?). So all my app will do is Sign Up users through Moralis and “somehow” I will be creating wallets programmatically through one of those service providers like coinbase / exodous to store those user’s information. Imagine a scenario where the user of your app is someone who doesnt know or care about wallets but all he knows is his username and password. How will you give him access to his dashboard where you want to present data to him that resides in his wallet ?

If you reckon there is an alternative solution, then would be super cool to hear.

if someone uses coinbase for example, they don’t really have access to the private key, they don’t even know if there exists a private key for their account, maybe it doesn’t even exists because it doesn’t make sense to pay gas fees for every transaction.

Thanks for correcting. I really appreciate that. Can you suggest a solution where once I have a working sign up form with email / password, users can sign up, their data is saved in the Moralis database (using Moralis javascript library), fine so far. And then those signed up users end up having their wallets with their data. When they successfully login with Moralis (authenticate), then the data in their wallets (like their balance, NFTs etc) is visible on their dashboard. I can anticipate how everything in this solution can be achieved Except for how they can have their own wallets.

you can create wallets programmatically, but you’ll need to do more research in that direction and also to take extra care for how you use/save the private key for those wallets.

if you really want to do that, probably you’ll need to hire a team only to handle that part

1 Like