使用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 });
- 通过护照Js注册用户
- Firebase child.once在auth.signInWithEmailAndPasswordcallback中超时不一致
- 如何在Node.js中重新使用由Play Framework 2.2设置的签名cookie?
- Node.js聊天 – 用户authentication
- 如何从第三方node.js服务器validationGame Center用户
- 与节点的代理http请求
- Sdk的获取身份validation令牌张贴在facebook / twitter /链接,然后发布使用nodejs
- SPA和node.js服务器的身份validation
- 用户注销:将GETredirect到POST(Node / Express)