angularjs - Firebase: Why $firebaseSimpleLogin throws a SecurityError? -



angularjs - Firebase: Why $firebaseSimpleLogin throws a SecurityError? -

i'm trying register users using firebase simple login mechanism:

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...'); // see $scope.loginservice.$createuser($scope.email, $scope.password).then(function(user) { console.log('done!'); // not console.log(user); }); }; });

but, see next error in console:

uncaught securityerror: blocked frame origin "https://s-dal5-nss-15.firebaseio.com" accessing frame origin "http://localhost:8100". frame requesting access has protocol of "https", frame beingness accessed has protocol of "http". protocols must match.

and, $createuser callback not executed.

i enabled "email & password" authentication , set localhost in list of authorized request origins.

what doing wrong?

simply put, "domain" (localhost in case) http whereas origin https, tends cause these sorts of errors. believe if match (however, in case, both must https), should no longer issue:

the frame requesting access has protocol of "https", frame beingness accessed has protocol of "http". protocols must match.

some more info can found on rest api reference | firebase documentation:

note https required. firebase responds encrypted traffic info remains safe.

angularjs firebase angularfire firebasesimplelogin

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -