我有一个使用Angular构建的Nativescript应用,并且我使用Nativescript插件Firebase:https://github.com/EddyVerbruggen/nativescript-plugin-firebase。
当我通过Facebook进行身份验证时,它会成功检索到我的用户数据,但该用户并未显示为已登录状态,并且不会触发onAuthStateChanged()侦听器。
我使用的功能是最简单的功能:
public async signInWithFacebookPopup(): Promise<any> {
return await firebase.login({
type: firebase.LoginType.FACEBOOK
}).then(
function (result) {
return result;
},
function (errorMessage) {
return {error: errorMessage};
}
);
}
所以这里得到的“结果”是实际的用户数据。
是否应触发onAuthStateChanged()方法?另外,登录并获取用户数据后,如果我调用firebaseWeb.auth()。currentUser,则会得到未定义。
[更新]
显示Facebook窗口时(在介绍我的凭据之前),我在控制台中收到此错误:
chromium: [INFO:library_loader_hooks.cc(51)] Chromium logging enabled: level = 0, default verbosity = 0
chromium: [ERROR:filesystem_posix.cc(89)] stat /data/user/0/[APP_NAME]/cache/WebView/Crashpad: No such file or directory (2)
chromium: [ERROR:filesystem_posix.cc(62)] mkdir /data/user/0/[APP_NAME]/cache/WebView/Crashpad: No such file or directory (2)
这可能会在以后破坏其他行为吗?