2
我想註冊使用火力地堡簡單登錄機制的用戶:
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
放在授權請求源列表中。
我在做什麼錯?
嘿你是如何解決這個問題的?我也面對 –