Dapp:
Users can register and sign in
Using if (!isAuthenticated) {}
to ask for the login info before rendering the app
Problem:
After a successful log-in with username+password I try to call the authenticate();
to connect to metamask, but it seems that it logs out of the account and then asks to connect using metamask.
Expected behavior: after user is already logged in, click connect using metamask and add that account to the user on the database.
Possible solutions:
Use await Moralis.link(accounts[0]);
, I tried to use this but because you are not connected there is no way get the accounts out of the window metamask
Help would be greatly appreciated :β)