Merhaba, büyük ihtimalle sdk güncellenmiş, güncel halini dökümanlardan bulabilirsiniz. Dökümanlardan bulduğum örneği aşağıya bırakıyorum;
import { getAuth, signInWithPhoneNumber } from "firebase/auth";
const phoneNumber = getPhoneNumberFromUserInput();
const appVerifier = window.recaptchaVerifier;
const auth = getAuth();
signInWithPhoneNumber(auth, phoneNumber, appVerifier)
.then((confirmationResult) => {
// SMS sent. Prompt user to type the code from the message, then sign the
// user in with confirmationResult.confirm(code).
window.confirmationResult = confirmationResult;
// ...
}).catch((error) => {
// Error; SMS not sent
// ...
});
şurayı görmüyor bu seferde import { getAuth, signInWithPhoneNumber } from 'firebase/auth'
3 parametre istiyor ya 2 si geliyo hatası alıyorum, direk firebase kütüphanesinden çekiyorum auth u , getAuth u , firebase.auth() yapsak olmaz mı?
const appVerifier = window.recaptchaVerifier; bu değerde undefined geliyor..
Possible Unhandled Promise Rejection (id: 8):
[Error: signInWithPhoneNumber failed: Expected 2 arguments but got 3.]
tüm parametreleri verdikten sonra ki hata
RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment with DOM support.
react gibi Allah cezasını versin, iş midemi bulandırdı şaka gibi bir sorun