this is my first question here =).
I’m working on a web page with firebase and VScode editor .(self learning)
every thing was ok until I paste auth code from firebase to VScode then this error appeared on web bage console :
Uncaught FirebaseError: Firebase: Error (auth/argument-error).
code in main.js on the editor :
<body>
<h1>login to website</h1>
<input id="phone" placeholder="phone"/>
<input id="otp" placeholder="otp"/>
<div id="recaptcha-container"> </div>
<button onclick="login()">sign-in</button>
<script src="/js/main.js"></script>
</body>
the code with error line in recaptchaVerification:
const firebaseApp = firebase.initializeApp(firebaseConfig);
const db = firebaseApp.firestore();
const auth = firebaseApp.auth();
const storageRef = firebaseApp.storage().ref();
function login() {
const phone = document.getElementById("phone").value;
const recaptchaVerifier =new firebase.auth.RecaptchaVerifier('recaptcha-container');
alert("hi");
})
}
I really appreciate your help ..
solving the problem with explain it =)
New contributor
Eman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.