0
Firebase를 사용하여 등록 사용자에게 확인 이메일을 보내고 싶습니다.AngularJS Firebase sendEmailVerification이 작동하지 않습니다.
내 등록 컨트롤러는 다음과 같다 :
app.controller("MyregisterCtrl", ["$scope", "firebase", "$firebaseAuth", "$location", function ($scope, firebase, $firebaseAuth, $location) {
$scope.signUp = function() {
var username = $scope.user.email;
var password = $scope.user.password;
if (username && password) {
var auth = $firebaseAuth();
var user = firebase.auth().currentUser;
auth.$createUserWithEmailAndPassword(username, password)
user.sendEmailVerification()
.then(function() {
console.log("User signup success");
$scope.errMsg = false;
$location.path('/login.signin');
}).catch(function (error) {
$scope.errMsg = true;
$scope.errorMessage = error.message;
});
}
}
}]);
사용자는 중포 기지 사용자 데이터베이스에 등록됩니다. 하지만 확인 이메일을 받으려면 제출 버튼을 세 번 클릭해야합니다. 아주 이상한.
왜 첫 번째 제출 클릭시 보내지 않습니까? 여기
오류 스크린 샷입니다 :