MetaMask internal browser

Hi, folks.
I’m a software engineer at blockchain company and we’re recently facing issues with MetaMask internal browser.
Our website has a password lock using AWS lambda function and it’s working well in any chrome browser.
When users open our website in any web browser, username and password window pops-up and if they type correct username and password then it shows the main content of website.
But username and password window doesn’t pop-up in MetaMask internal browser.
I think MetaMask developer team can answer this question.
Any help is appreciated.
Thanks.

Hello @ahong, welcome to MetaMask community!

Would you be able to submit an issue on the GitHub page here? :point_down:

Thank you

2 Likes

If I understand correctly, the problem occurs only on mobile devices?

1 Like

Yes, it only occurs on mobile devices.

If you want to resolve this issue, I can let you know the credentials.

Do not share project names on the forum, as per our rule #6, please. I removed the name and kept your post.

1 Like

Okay, then who can solve this issue?
One must look at our website and see what happens when it’s opened in MetaMask Internal Browser.

For a better understanding of the problem, you should add error logs.
But i think I can guess what the problem might be.

Do you have a login form write in alert ??)
Write a custom form to check the user who will be located on a specific route.
Do not forget that the MetaMask browser is not identical to standard browsers like Chrome.

1 Like

We used AWS lambda functions to protect our website.
Only dev team and related entities know the username and password.
So they can see the website before being launched publicly.
But the only issue is in MetaMask internal browser.
It’s not showing username and password window.
It simply says You're not authorized.

You need to close the resource name in the screenshot…

The frontend part of your application is written with what framework?

1 Like

We used React.js on the front-end side.

The first one is the screenshot when username or password is not correct and the second screenshot is the AWs Lambda function script I used for password protection.

When the website is opened in MetaMask internal browser, it doesn’t show up username and password window and simply displays the first screenshot I’ve just uploaded.

Excellent !

The form element is not picked up by the inspector in the browser, most likely it is written inside the Alert.

You need to create a functional form component that will display correctly in all browsers:


import React { useState } from 'react';


 const Form = () => { 

  const [login, setLogin] = useState("");
  const [password, setPassword] = useState("")

const sendData = (e) => {
    e.preventDefault();
    sendDataFromFrontendToBackend(login, password).then(data => {
      if(data.status === '200') {
    ///redirect to main page
} else {
   //do smth with error;
}})} 


 return (

  <form className="form" onSubmit={e => sendData(e)}>
      <input  type="text"  value={login} onChange={e => setLogin(e.target.value)} />
      <input  type="text"  value={password} onChange={e => setPassword(e.target.value)} />
      <button  onSubmit={e => sendData(e)}>Send</button>
  </form>
)
}
1 Like

I understand, I’m telling you that the error you have is not on the request processing side (server side), but specifically in the frontend part, you need to implement the form directly in the functional component

1 Like

Hi, @snwlprd.eth
Haha, you’re kinda funny.
We can simply create two input boxes to check everything.
Just like you said.
But the issue is in MetaMask Internal Browser.
Why is it not identifying AWS Lambda function script?

I answered above

Do not forget that the MetaMask browser is not identical to standard browsers like Chrome.

1 Like

I misunderstood you a bit, do you need to solve a login issue or want to discuss AWS Lambda identity issue ?

1 Like