使用Firebase身份validation和Express身份validation社交login?
我对Firebase颇为陌生,对Express也稍微有点新,而且我很难尝试使用Firebase提供的身份validationstream程。
我有这个路由,但每次我点击触发路由的button,我得到这个错误This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.
This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.
我很确定networking存储已启用,但我很不确定如何修复location.protocol
。 我究竟做错了什么?
路线如下:
app.get('/auth/facebook', function(req, res) { const provider = new firebase.auth.FacebookAuthProvider(); firebase.auth().signInWithPopup(provider) .catch(err => console.log(err)); });
这里是完整的Firebase应用程序
试试这段代码。
var provider = new firebase.auth.FacebookAuthProvider(); Auth.$signInWithPopup(provider).then(function(authData) { // success }).catch(function(error) { // error });
- Firebase createUserWithEmailAndPassword方法在node.js中未定义
- 在HTTP基本authentication中,为什么存储令牌更好?
- 在passport.js或session中的某处添加用户对象中的额外信息
- 用于Express.js的Rest APIvalidation和会话pipe理
- 处理令牌的体系结构(NodeJS)(MongoDB)
- 我如何使用Passport.js返回到当前散列位置?
- 使用Flux / React应用程序存储authentication详细信息
- 为什么connect-mongo为每个请求创build新的会话?
- 如果用户未经过validation,则显示公共逻辑React JS和Node API