javascript - Firebase authentication issue using AngularJS/AngularFire -
this question has answer here:
i getting error response firebase when trying make registration form register user. using angularjs , angularfire.
the error is:
the specified authentication provider not enabled firebase.
here form:
register.html
<form name="registrationform" ng-submit="register()" novalidate> <div class="form-group"> <label for="exampleinputemail1">first name</label> <input type="text" ng-model="user.firstname" ng-required="true" class="form-control form-control2" id="exampleinputemail1" placeholder="first name"> </div> <div class="form-group"> <label for="exampleinputemail1">last name</label> <input type="text" ng-model="user.lastname" ng-required="true" class="form-control form-control2" id="exampleinputemail1" placeholder="last name"> </div> <div class="form-group"> <label for="exampleinputemail1">email address</label> <input ng-model="user.email" ng-required="true" type="email" name="email" class="form-control form-control2" placeholder="email"> <p class="error" ng-show="loginform.email.$invalid && loginform.email.$touched">must valid email!</p> </div> <div class="form-group"> <label for="exampleinputpassword1">password</label> <input ng-model="user.password" ng-required="true" name="password" type="password" class="form-control form-control2" placeholder="password"> <p class="error" ng-show="loginform.password.$invalid && loginform.password.$touched">must enter password!</p> </div> <button ng-disabled="registrationform.$invalid" type="submit" class="btn btn-default">submit</button> <p style="margin-top: 5px;">or <span style="font-size: 14px"><a href="#/login">login</a></span></p> </form>
here registration function being called when submit form, , returning error on submit:
controllers.js
$scope.register = function() { auth.$createuser({ email: $scope.user.email, password: $scope.user.password }).then(function(reguser){ $scope.message = "hey, " + $scope.user.firstname + ", you're registered!"; }).catch(function(error){ $scope.message = error.message; }); //create user }; //register
i made sure enable email/password authentication in firebase settings, not know why getting response.
thanks help
i figured out why receiving error. syntax used above firebase databases have been created legacy console. in order enable email/password authentication new version of firebase, must follow steps listed here
Comments
Post a Comment