I'm using angular v13 and firebaseui and @angular/fire for authentication base on firebase V9 web modular , all sign in methods authentication providers are working except the phone authentication I got error type in console and even RecaptchaVerifier not showed and I got message error "Solve the reCAPTCHA"
ERROR TypeError: app.auth is not a function at new RecaptchaVerifier (index.esm2017.js:931:13) at K.phoneSignInStart (esm.js:339:310)
app.module.ts
imports: [
BrowserModule,
provideFirebaseApp(() => initializeApp(environment.firebase)),
provideAuth(() => getAuth())
]
import * as firebaseui from 'firebaseui'
import {Auth, PhoneAuthProvider
} from '@angular/fire/auth'
constructor(private auth:Auth){
const ui=new firebaseui.auth.AuthUI(this.auth)
ui.start('#firebaseui-auth-container', {
signInOptions: [
{provider:PhoneAuthProvider.PROVIDER_ID,
recaptchaParameters: {
type: 'image',
size: 'normal',
badge: 'bottomleft'
}
}
]
})
I require the official way using official firebaseui