我很难正确导入firebase。我使用Vue3并通过yarn add firebase安装了防火墙
这是我的firebase.js文件:
import firebase from 'firebase/app';
但是,这会导致以下错误:1:1 error 'firebase/app' should be listed in the project's dependencies. Run 'npm i -S firebase/app' to add it import/no-extraneous-dependencies
import
我一直试图使用enableIndexedDbPersistence来启用Vue3网站上的脱机功能,使用docs 中的说明。所有东西都编译得很好,但是应用程序总是在浏览器的控制台日志中抛出一个模糊的错误:
[2022-03-19T13:02:21.945Z] @firebase/firestore: Firestore (9.6.4): INTERNAL UNHANDLED ERROR: Error: Failed to execute 'put' on 'IDBObjectStore': #<Object> could not be cloned
我正在尝试使用自定义生成的令牌来实现身份验证。
当身份验证成功时,将在身份验证服务器上生成这些令牌。
然后我将该令牌传递给我的Firebase应用程序
firebase.auth().signInWithCustomToken(token)
并获得包含以下错误消息的400响应:
The custom token format is incorrect
正如我所说的,这些令牌是从Firebase和独立生成的,我认为这是我的问题所在。
我的问题:是否可以设置自定义令牌身份验证,而无需在身份验证服务器上设置服务帐户私钥?