Hi team!
On desktop, my react app allows for users to connect with the react authenticate() call. However, on mobile devices, even with the browser in desktop mode, there is no prompt for Metamask to connect. My guess as to why is that Metamask is a separate app on mobile rather than an extension of the browser on mobile. I searched the forums but didn’t see this question asked already. Code below is extracted from App to simplify only what I’m using to login a user. Thanks for any advice!
import { useMoralis } from "react-moralis";
function App() {
const { authenticate, isAuthenticated, user, logout, Moralis} = useMoralis();
const authenticateUser = async () =>{
if(!isAuthenticated){
await authenticate();
}
}
return (
<button className='btn1' onClick={() => authenticateUser()}>
)}