one of the accurate video on TH-cam , you just saved me I am trying to do this from two days. Finally got it done just because of you. Thank you soo much
anh ơi em bị lỗi Firebase: Firebase App named '[DEFAULT]' already exists (app/duplicate-app). FirebaseError: Firebase: Firebase App named '[DEFAULT]' already exists (app/duplicate-app). ạ...Làm sao để khắc phục được ạ...?
Trong thư mục public bắt buộc phải có file *index.html* nha bạn (không được đổi tên file này). Phần code react bạn nên tạo file .js để bên ngoài thư mục public
@@baobaostore file index.html của em để làm trang chủ á anh còn file để xác thực SĐT thì em đổi thành SDT.html thì lúc mà em vào để xác thực SĐT thì nó không hiện cái gì hết á anh
@@pepsi1910 phần code bên file *SDT.html* bạn có import firebase SDK vào chưa? (cái này có code mẫu khi mới tạo project firebase trên web) bạn phải cho nó init khi window.onload
import React, { Component } from 'react';
import firebaseConfig from './firebaseConfig';
import * as firebaseui from 'firebaseui';
import firebase from 'firebase';
import 'firebaseui/dist/firebaseui.css';
class App extends Component {
componentDidMount() {
firebase.initializeApp(firebaseConfig);
const uiConfig = {
signInOptions: [{
provider: firebase.auth.PhoneAuthProvider.PROVIDER_ID,
recaptchaParameters: {
type: 'image',
size: 'normal',
badge: 'bottomleft'
},
defaultCountry: 'VN'
}],
callbacks: {
signInSuccessWithAuthResult: function(authResult, redirectUrl){
alert('successful');
return true;
}
},
signInSuccessUrl : "youtube.com"
};
var ui = new firebaseui.auth.AuthUI(firebase.auth());
ui.start("#firebaseui-auth-container", uiConfig);
};
render() {
return (
);
}
}
export default App;
one of the accurate video on TH-cam , you just saved me I am trying to do this from two days. Finally got it done just because of you. Thank you soo much
anh ơi em bị lỗi Firebase: Firebase App named '[DEFAULT]' already exists (app/duplicate-app).
FirebaseError: Firebase: Firebase App named '[DEFAULT]' already exists (app/duplicate-app). ạ...Làm sao để khắc phục được ạ...?
Add email password authentication also to it
Firebase: Error (auth/configuration-not-found). Dismiss facing this error
em đổi tên file index.html thành SDT.html thì nó không hiện gì hết là sao anh
Trong thư mục public bắt buộc phải có file *index.html* nha bạn (không được đổi tên file này). Phần code react bạn nên tạo file .js để bên ngoài thư mục public
@@baobaostore file index.html của em để làm trang chủ á anh còn file để xác thực SĐT thì em đổi thành SDT.html thì lúc mà em vào để xác thực SĐT thì nó không hiện cái gì hết á anh
Bạn liên kết 2 file đó lại như thế nào? mở F12 *console.log* có hiện gì không? Bạn up code lên mình xem thử nha!
đây là file index.html nè anh
Document
bấm vào đây để liên kết SĐT
@@pepsi1910 phần code bên file *SDT.html* bạn có import firebase SDK vào chưa? (cái này có code mẫu khi mới tạo project firebase trên web) bạn phải cho nó init khi window.onload
Firebase: Hostname match not found (auth/captcha-check-failed).