I have a problem like this in the mobile web app (android, os): When User call authenticate method first user must click connect button in Metamask and after sign message. But in my case, after the user press connect button in Metamask mobile app it redirects to my website app before signing the message and the user can’t see the sign request if He/She doesn’t open Metamask mobile app again to see the sign request which already popped up.
Please help me with How I can fix this problem. Can I avoid redirecting to my web app before the user sign the message?
my code: ( code works perfectly. Only above mentioned problem )
var user;
user = Moralis.User.current();
async function walletConect(provider) {
if (!user) {
user = await Moralis.authenticate({
provider: "walletconnect",
mobileLinks: [provider] ,
chainId: 56,
signingMessage: "Welcome"
}).then(function (user) {
triggerConnect(provider);
})
.catch(function (error) {
});
}
}