Ionic firebase Simple Login email and password Error

TypeError: $firebaseAuth is not a function

ionic.bundle.js:26794 TypeError: Auth.$authWithPassword is not a function
at Scope.$scope.login (app.js:148)
at fn (eval at (ionic.bundle.js:27638), :4:206)
at ionic.bundle.js:65427
at Scope.$eval (ionic.bundle.js:30395)
at Scope.$apply (ionic.bundle.js:30495)
at HTMLAnchorElement. (ionic.bundle.js:65426)
at defaultHandlerWrapper (ionic.bundle.js:16787)
at HTMLAnchorElement.eventHandler (ionic.bundle.js:16775)
at triggerMouseEvent (ionic.bundle.js:2953)
at tapClick (ionic.bundle.js:2942)

I keep getting the above error. The controller is perfect. When used in a web app it works perfectly fine but in ionic it keeps giving error. Please help me.

My App.js ``

angular.module(‘dbcare’, [‘ionic’,‘firebase’])
.config(function ($stateProvider, $urlRouterProvider) {

.state('login', {
url: '/login',
templateUrl: 'views/login.html',
controller: 'LoginCtrl'

.state('signup', {
url: '/signup',
templateUrl: 'views/signup.html',



.factory(‘Auth’, function($firebaseAuth) {
var ref = new Firebase(“https//”);
return $firebaseAuth(ref);
})indent preformatted text by 4 spaces

My Controller
.controller(‘LoginCtrl’,[’$scope’,’$ionicModal’,‘Auth’,’$location’, function ($scope,$ionicModal,$location,Auth) {

$scope.login = function() {

var username = $;
var password = $scope.password;

        email: username,
        password: password
    .then(function(authData) {

console.log(“Logged in as:”, authData.uid);
}).catch(function(error) {
console.error(“Authentication failed:”, error);



i have a sample application here,

make sure you have added both firebase and angularFire to your project



Thank you aaronksaunders for replying. I have added the firebase.js and angularfire but before my app.js let me try adding them below the app.js and see. Also i will try to execute your code and see where i am going wrong. Thank you once again.

I have tried your example but I’m getting "controllers.js:20 Authentication failed: Error: The specified authentication provider is not enabled for this Firebase.(…)"
when I try to log in or create new account.

Do you have any idea what this could be?


In app.js configure application with your firebase information

  .value("AUTHREF", new Firebase("https://[YOUR-STUFF]"))
  .value("TEXT_ITEMS_REF", new Firebase("https://[YOUR-STUFF]"))

Sounds like a configuration issue and that you haven’t set up email authentication

That solved it. Thanks.
I discovered Firebase to day any used instead of
What is the difference?
It has to be connected, because my app-name/url is occupied in firebaseio since I have used it in google

Hey aaronksaunders. Thanks man! Everything is AOK! Thanks a lot. There was a problem with dependency injection but your code straightened it all out.

Hey Aaron,
do you habe any plans to update your sample project on github to firebase v3 now that there is an update to angularfire?

There are already projects supporting ionic2 and the original ionic that supports firebase3.

They just fixed the issue last night for angularFire2 with Firebase3, so if you download those projects and install the latest versions you should be good to go.

I will update the projects this weekend.

1 Like