我正在尝试使用 Firebase 简单登录机制注册用户:
angular.module('MyApp').controller('LoginCtrl', function($scope, $firebaseSimpleLogin, FIREBASE_ROOT) {
$scope.loginService = $firebaseSimpleLogin(new Firebase(FIREBASE_ROOT));
$scope.user = {
email: '',
password: ''
};
$scope.register = function() {
console.log('creating user...'); // I see this
$scope.loginService.$createUser($scope.email, $scope.password).then(function(user) {
console.log('done!'); // But not this
console.log(user);
});
};
});
但是,我在控制台中看到以下错误:
Uncaught SecurityError: Blocked a frame with origin
"https://s-dal5-nss-15.firebaseio.com" from accessing a frame with origin
"http://localhost:8100". The frame requesting access has a protocol of "https",
the frame being accessed has a protocol of "http". Protocols must match.
并且,$createUser
不执行回调。
我启用了“电子邮件和密码”身份验证并将localhost
其放入授权请求来源列表中。
我究竟做错了什么?