AngularFire 7 问题与 firebaseUi 5
AngularFire 7 issue with firebaseUi 5
更新我的项目后,我遇到了 firebaseui 问题,这是我当前的代码:
import { AngularFireAuth } from '@angular/fire/compat/auth';
import firebase from 'firebase/compat/app';
import * as firebaseui from 'firebaseui';
import PhoneAuthProvider = firebase.auth.PhoneAuthProvider;
import GoogleAuthProvider = firebase.auth.GoogleAuthProvider;
export class SigninComponent implements OnInit, OnDestroy {
ui!: firebaseui.auth.AuthUI;
constructor(
private afAuth: AngularFireAuth,
private router: Router
) { }
ngOnInit(): void {
this.afAuth.app.then(app => {
const uiConfig: firebaseui.auth.Config = {
signInOptions: [
PhoneAuthProvider.PROVIDER_ID,
GoogleAuthProvider.PROVIDER_ID,
],
callbacks: {
signInSuccessWithAuthResult: this.onSuccessLogIn.bind(this)
}
}
this.ui = new firebaseui.auth.AuthUI(app.auth());
this.ui.start('#firebaseui-auth-container', uiConfig);
// this.ui.disableAutoSignIn();
})
}
我收到这个错误:
./node_modules/firebaseui/dist/esm.js:347:22-60 - Error: export 'default' (imported as 'firebase') was not found in 'firebase/app' (possible exports: FirebaseError, SDK_VERSION, _DEFAULT_ENTRY_NAME, _addComponent, _addOrOverwriteComponent, _apps, _clearComponents, _components, _getProvider, _registerComponent, _removeServiceInstance, deleteApp, getApp, getApps, initializeApp, onLog, registerVersion, setLogLevel)
我尝试搜索并使用任何想法来找出问题所在,但没有任何效果...
有什么想法吗?!
FirebaseUI 尚未针对 Firebase Authentication SDK v9 进行更新。它正在积极开发中,您可以在 this issue.
上跟踪进度
更新我的项目后,我遇到了 firebaseui 问题,这是我当前的代码:
import { AngularFireAuth } from '@angular/fire/compat/auth';
import firebase from 'firebase/compat/app';
import * as firebaseui from 'firebaseui';
import PhoneAuthProvider = firebase.auth.PhoneAuthProvider;
import GoogleAuthProvider = firebase.auth.GoogleAuthProvider;
export class SigninComponent implements OnInit, OnDestroy {
ui!: firebaseui.auth.AuthUI;
constructor(
private afAuth: AngularFireAuth,
private router: Router
) { }
ngOnInit(): void {
this.afAuth.app.then(app => {
const uiConfig: firebaseui.auth.Config = {
signInOptions: [
PhoneAuthProvider.PROVIDER_ID,
GoogleAuthProvider.PROVIDER_ID,
],
callbacks: {
signInSuccessWithAuthResult: this.onSuccessLogIn.bind(this)
}
}
this.ui = new firebaseui.auth.AuthUI(app.auth());
this.ui.start('#firebaseui-auth-container', uiConfig);
// this.ui.disableAutoSignIn();
})
}
我收到这个错误:
./node_modules/firebaseui/dist/esm.js:347:22-60 - Error: export 'default' (imported as 'firebase') was not found in 'firebase/app' (possible exports: FirebaseError, SDK_VERSION, _DEFAULT_ENTRY_NAME, _addComponent, _addOrOverwriteComponent, _apps, _clearComponents, _components, _getProvider, _registerComponent, _removeServiceInstance, deleteApp, getApp, getApps, initializeApp, onLog, registerVersion, setLogLevel)
我尝试搜索并使用任何想法来找出问题所在,但没有任何效果...
有什么想法吗?!
FirebaseUI 尚未针对 Firebase Authentication SDK v9 进行更新。它正在积极开发中,您可以在 this issue.
上跟踪进度