# Ionic and firebase - login, signin & Facebook problems

**URL:** <https://forum.ionicframework.com/t/ionic-and-firebase-login-signin-facebook-problems/53895>\
**Category:** ionic-v1\
**Created:** [June 4, 2016, 5:03pm UTC](https://forum.ionicframework.com/t/ionic-and-firebase-login-signin-facebook-problems/53895 "2016-06-04T17:03:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AntoninMarchard](https://avatars.discourse-cdn.com/v4/letter/a/71e660/32.png) [@AntoninMarchard](https://forum.ionicframework.com/u/AntoninMarchard)\
**Post date:** [June 4, 2016, 5:03pm UTC](https://forum.ionicframework.com/t/ionic-and-firebase-login-signin-facebook-problems/53895/1 "2016-06-04T17:03:34Z")

</div>

Hi everyone !  
I’m creating an app for my years end application in my school. I try to create an identification system with login, signup, and maybe a facebook connect. However, I had a big problem with firebase, the google chrome console display this message : ‘ReferenceError: Firebase is not defined’ … I don’t understand what happened, because in my section I add :

`<script src="lib/firebase/firebase.js"></script> <script src="lib/angularfire/dist/angularfire.js"></script>`

But it doesn’t work … This is my script for my connexion system :

```
.controller('loginCtrl', function($scope, $state) {
    $scope.loginEmail = function(){
    var ref = new Firebase("https://WizzU.firebaseio.com");
    ref.authWithPassword({
      email : $scope.data.email,
      password : $scope.data.password
    }, function(error, authData) {
      if (error) {
        console.log("Login Failed!", error);
      } else {
        console.log("Authenticated successfully with payload:", authData);
      }
    });
   
  };
})
// Inscription Controller
.controller('signinCtrl', function($scope) {
  $scope.signupEmail = function(){  
 
  var ref = new Firebase("https://WizzU.firebaseio.com");
 
  ref.createUser({
    email : $scope.data.email,
    password : $scope.data.password
  }, function(error, userData) {
    if (error) {
      console.log("Error creating user:", error);
    } else {
      console.log("Successfully created user account with uid:", userData.uid);
    }
  });
};
});`

```

Does anyone could help me ? 😕  
Thank !

---

<div class="post-metadata">

**Author:** ![aaronksaunders](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/aaronksaunders/32/13729_2.png) [@aaronksaunders](https://forum.ionicframework.com/u/aaronksaunders)\
**Post date:** [June 5, 2016, 4:34am UTC](https://forum.ionicframework.com/t/ionic-and-firebase-login-signin-facebook-problems/53895/2 "2016-06-05T04:34:21Z")

</div>

> **[aaronksaunders/ionic-angularfire-sample](https://github.com/aaronksaunders/ionic-angularfire-sample)**
>
> Contribute to ionic-angularfire-sample development by creating an account on GitHub.
