node.js - 发生 Firebase 身份验证错误
问题描述
我正在使用 firebaseui 方法在 vuejs 中进行 firebase 身份验证。但我收到此错误
Could not find the FirebaseUI widget element on the page.
这是我的代码
var config = {
apiKey: "some api key",
authDomain: "sample-1234.firebaseapp.com",
databaseURL: "https://sample-1234.firebaseio.com",
projectId: "sample-1234",
storageBucket: "sample-1234.appspot.com",
messagingSenderId: "123456789",
clientId: "2565985323215244u7hf3lc6k.apps.googleusercontent.com"
};
var app = firebase.initializeApp(config);
var auth = app.auth();
var uiConfig = {
signInSuccessUrl: 'http://localhost:8080/',
signInOptions: [{
firebase.auth.GoogleAuthProvider.PROVIDER_ID,
}],
tosUrl: '<your-tos-url>'
};
var ui = new firebaseui.auth.AuthUI(auth);
console.log(ui);
ui.start('#firebaseui-auth-container', uiConfig);
解决方案
推荐阅读
- docker - Dockerfile 复制到一个文件夹上
- batch-processing - 有没有办法在 Mule 4 中等待批处理完成?
- java - 在 JNI 层中创建 c++ 实例,将其作为长对象传递给 Java 类,但方法返回垃圾值
- github - 删除 Github Jekyll 中的“博客”部分
- node.js - Microsoft Bot - Node SDK:如何发布到公共频道*而不回复上一个。活动*
- node.js - Node JS Mongo $near 不适用于嵌套字段
- bash - 在 Bash 中查找最近编辑的文件
- python - 两个数据帧的所有列对之间的列相关性
- laravel - 有没有人找到解决方案来尝试获取非对象的属性“枢轴”?
- c# - c# passing inline interface like delegate method