After Deploy React Web Appl to Firebase Hosting. PhoneAuth work on Android and Laptop but for IOS devices such like iphone and ipad wont able to click verify to login
See original GitHub issueAfter deployment, i try to log in using phone auth on an iOS device it won’t work or won’t respond at all. Can Any1 help me to solve for me this error!!! Thank you
Below is my code that i use as given from the web firebaseui code
FBForm.js import React from “react”; import firebase, { firebaseAuth } from “…/…/firebase”; import PropTypes from “prop-types”; import { FirebaseAuth } from “react-firebaseui”;
class FBForm extends React.Component {
// Configure FirebaseUI.
uiConfig = {
signInFlow: “redirect”,
signInOptions: [
{
provider: firebase.auth.PhoneAuthProvider.PROVIDER_ID,
recaptchaParameters: {
type: “image”, // ‘audio’
size: “normal”, // ‘invisible’ or ‘compact’
badge: “bottomleft” //’ bottomright’ or ‘inline’ applies to invisible.
},
defaultCountry: “SG” // Set default country to the Singapore (+65).
}
],
// Sets the signedIn
state property to true
once signed in.
callbacks: {
signInSuccess: () => {
this.props.submit();
return false; // Avoid redirects after sign-in.
}
}
};
render() { return ( <div> <FirebaseAuth uiConfig={this.uiConfig} firebaseAuth={firebaseAuth} /> </div> ); } }
FBForm.propTypes = { submit: PropTypes.func.isRequired };
export default FBForm;
firebase.js import firebase from ‘firebase’;
export const config = { apiKey: process.env.REACT_APP_FIREBASE_API_KEY, authDomain: process.env.REACT_APP_FIREBASE_AUTH_DOMAIN, databaseURL: process.env.REACT_APP_FIREBASE_DATABASE_URL, projectId: process.env.REACT_APP_FIREBASE_PROJECT_ID, storageBucket: process.env.REACT_APP_FIREBASE_STORAGE_BUCKET, messagingSenderId: process.env.REACT_APP_FIREBASE_MESSAGING_SENDER_ID };
export const firebaseApp = firebase.initializeApp(config); export const firebaseAuth = firebaseApp.auth(); export const firebaseStorage = firebaseApp.storage(); export const firebaseDb = firebaseApp.database(); export default firebase;
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
Ok, I checked your app. You are getting the error:
TypeError: undefined is not an object (evaluating 'window.dialogPolyfill.registerDialog')
This is a duplicate of https://github.com/firebase/firebaseui-web/issues/150You can solve for now by doing:
window.dialogPolyfill = dialogPolyfill;
Glad it worked. I will try to get a permanent fix for this in the coming weeks.