I can't able to access the firebase. Error log shows:
Projects created at console.firebase.google.com must use the new Firebase Authentication SDKs available from firebase.google.com/docs/auth/
How can I proceed in this?
I want to use authenticate by Email and Password, And I need to setup db and using fetching & update workflow.
I used below coding part,
index.html
<!-- Firebase -->
<script src="https://cdn.firebase.com/js/client/2.2.4/firebase.js"></script>
<!-- AngularFire -->
<script src="https://cdn.firebase.com/libs/angularfire/1.1.2/angularfire.min.js"></script>
<div class="list">
<label class="item item-input">
<span class="input-label">Username</span>
<input type="email" ng-model="userDetails.userEmail">
</label>
<label class="item item-input">
<span class="input-label">Password</span>
<input type="password" ng-model="userDetails.userPassword">
</label>
<button class="button button-full button-positive" ng-click="doLogin()">
Sign In
</button>
</div>
app.js
var starterApp = angular.module('starterApp', ['ionic', 'starterApp.UserOneController','starterApp.UserTwoController','starterApp.UserHomeController','starterApp.UserAccountController','starterApp.services','starterApp.Filters','firebase'])
UserAccountController.js
.controller('UserAccountCtrl', function($scope,$rootScope,$filter,$firebaseAuth,$ionicLoading) {
$scope.doLogin = function() {
// Adding fireBase
var ref = new Firebase("https://sierra-e352f.firebaseio.com");
var eMail = '[email protected]';
var userPwd = 'suthm@123';
ref.createUser({
email : eMail,
password : userPwd
}, function(error, userData) {
if (error) {
alert("Error creating user:", error);
console.log("Error creating user:", error);
} else {
alert("Successfully created user account with uid:", userData.uid);
console.log("Successfully created user account with uid:", userData.uid);
}
});
});
Thanks!