我正在尝试使用Google登录但它却抛出了这个错误:
代码:"auth/operation-not-supported-in-this-environment"消息:"此应用程序运行的环境不支持此操作."location.protocol"必须是http,https或chrome-extension和web必须启用存储."
这是代码:
const provider = new firebase.auth.GoogleAuthProvider();
provider.addScope('profile');
provider.addScope('email');
firebase.auth().signInWithPopup(provider)
.then((result) => {
console.log(result);
})
.catch((error) => {
console.log(error);
})
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?提前致谢!
我需要从React Navigation Header调用SearchScreen类方法.
导航器看起来像这样:
Search: {
screen: SearchScreen,
path: 'search/:query',
navigationOptions: {
title: 'Search',
header: {
right: (
<MaterialCommunityIcons
name="filter"
onPress={() => {
console.log(this);
}}
style={{marginRight: 15, color: 'white'}}
size={24}
/>
),
},
}
}
Run Code Online (Sandbox Code Playgroud)