我试图围绕着可观察者.我喜欢observables解决开发和可读性问题的方式.在我读到的时候,好处是巨大的.
关于HTTP和集合的可观察量似乎是直截了当的.我怎样才能将这样的东西转换为可观察的模式.
这是来自我的服务组件,用于提供身份验证.我希望它能像Angular2中的其他HTTP服务一样工作 - 支持数据,错误和完成处理程序.
firebase.auth().createUserWithEmailAndPassword(email, password)
.then(function(firebaseUser) {
// do something to update your UI component
// pass user object to UI component
})
.catch(function(error) {
// Handle Errors here.
var errorCode = error.code;
var errorMessage = error.message;
// ...
});
Run Code Online (Sandbox Code Playgroud)
这里的任何帮助将不胜感激.我唯一的替代解决方案是创建EventEmitter
s.但我想这是在服务部门做事的一种可怕方式
我们被要求在说明中设置Facebook的OAuth重定向URI(如下所示),以设置Google Firebase以使用Facebook登录.
我们点击了我们应用的每个菜单.它在哪里?它会被称为不同的东西吗?
...确保您的OAuth重定向URI(例如my-app-12345.firebaseapp.com/__/auth/handler)在Facebook for Developers网站的Facebook应用设置页面中列为您的OAuth重定向URI之一产品设置> Facebook登录配置.
使用新的firebase云功能,我决定将我的一些HTTP端点移动到firebase.一切都很好......但我有以下问题.我有两个端点由HTTP触发器(云功能)构建
虽然第一个端点很好,但对于我的第二个端点,我希望仅为经过身份验证的用户保护它.意思是拥有我之前生成的令牌的人.
我该如何解决这个问题?
我知道我们可以使用云函数获取Header参数
request.get('x-myheader')
Run Code Online (Sandbox Code Playgroud)
但有没有办法保护端点就像保护实时数据库一样?
firebase firebase-security firebase-authentication firebase-realtime-database google-cloud-functions
我在我的javascript文件中使用firebase节点api进行Google登录.
firebase.initializeApp(config);
let provider = new firebase.auth.GoogleAuthProvider();
firebase.auth().signInWithPopup(provider);
Run Code Online (Sandbox Code Playgroud)
这很好用,用户可以使用他的Google凭据登录.当用户再次访问该页面时,弹出窗口再次打开,但由于他已经登录,弹出窗口关闭而不需要用户进行任何交互.有没有办法在提示弹出窗口之前检查是否已经有登录用户?
自升级到最新版本的Firebase(9.0.0)以来,在通过身份验证用户时,我无法摆脱以下两个错误signInWithEmailAndPassword()
.有谁知道发生了什么?
05-19 18:09:49.245 23550-23589/[PACKAGE] E/DynamiteModule: Failed to load
module descriptor class: Didn't find class
"com.google.android.gms.dynamite.descriptors.com.google.firebase.auth.ModuleDescriptor"
on path: DexPathList[[zip file
"/data/app/[PACKAGE]-3/base.apk"],nativeLibraryDirectories=
[/data/app/[PACKAGE]-3/lib/x86, /vendor/lib, /system/lib]]
Run Code Online (Sandbox Code Playgroud)
和
05-19 18:09:49.252 23550-23550/[PACKAGE] E/FirebaseApp: Firebase API
initialization failure.java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at com.google.firebase.FirebaseApp.zza(Unknown Source)
at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
at com.google.firebase.FirebaseApp.zzbu(Unknown Source)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1748)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1723)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
(...)
Caused by: java.lang.IncompatibleClassChangeError: The method 'java.io.File android.support.v4.content.ContextCompat.getNoBackupFilesDir(android.content.Context)' was expected to be of type virtual but instead was found to be …
Run Code Online (Sandbox Code Playgroud) 我尝试将 Android 项目连接到 Firebase,但在将以下内容添加到 pubsec.yaml 时出现此错误:
firebase_auth: ^0.16.0
cloud_firestore: ^0.13.5
Run Code Online (Sandbox Code Playgroud)
当我运行 gradle 但它不起作用时
Plugin project :firebase_core_web not found. Please update settings.gradle.
Plugin project :firebase_auth_web not found. Please update settings.gradle.
Plugin project :cloud_firestore_web not found. Please update settings.gradle.
Run Code Online (Sandbox Code Playgroud)
有什么解决办法吗
dart firebase firebase-authentication flutter google-cloud-firestore
我正在使用Fragment来设计Firebase简单登录注册.
我OnCreateView()
在初始化方法中遇到错误
auth = FirebaseAuth.getInstance();
Run Code Online (Sandbox Code Playgroud)
错误: - 错误:(58,28)错误:找不到com.google.android.gms.internal.zzaja的zzaja类文件,请找帮助来源: - http://www.androidhive.info/2016/06/ Android的工具入门-火力-简单的登录注册,认证/
android firebase android-gradle-plugin firebase-authentication
当我使用Xcode 9 beta 4运行我的swift 3.2代码时,这是我得到的错误:
*** Terminating app due to uncaught exception 'com.firebase.core', reason: '[FIRApp configure]; (FirebaseApp.configure() in Swift) could not find a valid GoogleService-Info.plist in your project. Please download one from https://console.firebase.google.com/.'
我已经有一个GoogleService-Info.plist文件,其名称与它应该完全相同且有效.
对firebase有什么试验吗?
我正在使用 firebase 及其 google auth 工具,一切正常,用户数据保存在数据库中,但每次出现弹出窗口时我都会收到错误(Cross-Origin-Opener-Policy 策略会阻止 window.close 调用)
我正在使用 next js 并帮助我解决错误,谢谢
不确定我是否做错了但使用此api https://www.firebase.com/docs/security/simple-login-email-password.html我可以成功创建用户 - 根据回复消息,但我无法在Forge控制台中的任何位置看到该用户.你怎么知道用户注册了什么?
我应该在Firebase中获取返回的用户ID并创建我自己的用户对象,还是不需要复制.我确实需要添加一些额外的用户属性,因此无论如何我都需要这样做.