Hey, you can already do this but it will require steps on your part. As you already know we support both wallet authentication and email/sign up. To combine the two what you can do is on user logging in with metamask, you can query the user table to see if they have an email, if they donβt you make them provide, email, password, username before continuing. Upon doing that you can user moralis sign up to link the two. A simple version could look something like this
async function login() {
let user = Moralis.User.current();
await Moralis.authenticate();
user = Moralis.User.current();
user.set("username", "my name");
user.set("password", "my pass");
user.set("email", "[email protected]");
try {
await user.signUp();
} catch (error) {
alert("Error: " + error.code + " " + error.message);
}
}
Hope this helps !