Javascript Firebase登录时弹出错误的url-提供程序未定义

Javascript Firebase登录时弹出错误的url-提供程序未定义,javascript,firebase,firebase-authentication,Javascript,Firebase,Firebase Authentication,我的谷歌登录弹出窗口有问题 在我的本地开发环境中,使用google注册会打开一个弹出窗口,其中的URL以以下开头: https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=myId.apps.googleusercontent.com&redirect_uri=https%3A%2F%2FmyProjectId.firebaseapp.com%2F__%2Fauth%2Fhandler&

我的谷歌登录弹出窗口有问题

在我的本地开发环境中,使用google注册会打开一个弹出窗口,其中的URL以以下开头:

https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=myId.apps.googleusercontent.com&redirect_uri=https%3A%2F%2FmyProjectId.firebaseapp.com%2F__%2Fauth%2Fhandler&state=
https://myProjectId.firebaseapp.com,/__/auth/handler?apiKey=myProdAPIKey%2C&appName=[DEFAULT]&authType=signInViaPopup&providerId=google.com&scopes=profile&eventId=xxxxxxxx&v=7.20.0
在my production env(另一个firebase项目)上,与google注册会打开一个弹出窗口,其中的URL以:

https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=myId.apps.googleusercontent.com&redirect_uri=https%3A%2F%2FmyProjectId.firebaseapp.com%2F__%2Fauth%2Fhandler&state=
https://myProjectId.firebaseapp.com,/__/auth/handler?apiKey=myProdAPIKey%2C&appName=[DEFAULT]&authType=signInViaPopup&providerId=google.com&scopes=profile&eventId=xxxxxxxx&v=7.20.0
在我的开发环境中,一切都按预期工作。不在我的生产环境中

在第一种情况下,以下内容返回预期的提供程序对象:

var provider = new firebase.auth.GoogleAuthProvider();
在第二种情况下,提供程序是未定义的。我错过了什么

我按如下方式导入firebase:

import firebase from 'firebase/app';

正在尝试作为导入包

import firebase from 'firebase/auth'