I'm starting my first project with Firebase. I just try to make a simple authentification for a website, but when I try to login myself, I have this error :
Error: FirebaseSimpleLogin: Projects created at console.firebase.google.com must use the new Firebase Authentication SDKs available from firebase.google.com/docs/auth/
I went to firebase.google.com/docs/auth/ , but I didn't find a solution (maybe I miss it).
I made a user from the Firebase back-office.
Here is my controller :
angular.module('roomApp')
.controller('homeCtrl', function($scope, $firebaseObject) {
// var firebaseObj = new Firebase("https://roomsaveur-4dfe8.firebaseio.com");
console.log('tototo')
firebase.initializeApp(config);
const rootRef = firebase.database().ref().child('roomsaveur-4dfe8');
const ref = rootRef.child('database');
this.object = $firebaseObject(ref);
firebase.auth().createUserWithEmailAndPassword(email, password).then(function(user) {
var user = firebase.auth().currentUser;
var email = $scope.user.email;
var password = $scope.user.password;
// logUser(user); // Optional
}, function(error) {
console.log(error)
var errorCode = error.code;
var errorMessage = error.message;
});
}]);
And my HTML :
<form class="form-signin" role="form">
<input ng-model="mail" type="email" class="form-control" placeholder="Email address" required="" autofocus="">
<input ng-model="password" type="password" class="form-control" placeholder="Password" required="">
<button class="btn btn-lg btn-primary btn-block" type="submit" ng-click="signIn($event)">Sign in</button>
</form>
Thanks by advance