title: Migrating Firebase 2.x to 3.4.1 AngularJS For Google OAuth
body: <p>I am new to Angular &amp; Firebase. I am currently developing an Ionic app. Somehow I came to know that, to use Firebase, I need to set up authentication system (I prefer Google).</p>
  
  <p>It was not easy to integrate the code into AngularJS which were mentioned in official Firebase website. So I just picked up someone's  working code and replaced his Firebase database URL to mine, I could get it done. But it was a mistake.</p>
  
  <p>This is the unchanged code and his output (which is working as expected).</p>
  
  <p>index.html</p>
  
  <pre><code>&lt;script src="lib/angularfire/dist/angularfire.min.js"&gt;&lt;/script&gt;
  &lt;script src="lib/firebase/firebase.js"&gt;&lt;/script&gt;
  
  &lt;!-- cordova script (this will be a 404 during development) --&gt;
  &lt;script src="cordova.js"&gt;&lt;/script&gt;
  
  &lt;!-- your app's js --&gt;
  &lt;script src="js/app.js"&gt;&lt;/script&gt;
  &lt;script src="js/controllers.js"&gt;&lt;/script&gt;
  &lt;script src="js/services.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>app.js</p>
  
  <pre><code>angular.module('starter', ['ionic', 'starter.controllers', 'starter.services', 'firebase'])
  
  .constant('FirebaseUrl', 'https://ionicle.firebaseio.com/')
  
  .service('rootRef', ['FirebaseUrl', Firebase])
  </code></pre>
  
  <p>So first, I removed his Firebase URL to add mine and got this error:</p>
  
  <blockquote>
    <p>We have detected that you are using the v2.x or lower authentication SDKs with a project that was created at console.firebase.google.com. You must use the 3.0.0 or greater authentication SDKs with projects that have been created in the new console. </p>
  </blockquote>
  
  <p>Then I updated <code>firebase.js</code> file to 3.4.1 version. Then I got a Reference error in browser's Dev console: <strong>ReferenceError: Firebase is not defined</strong></p>
  
  <pre><code>.service('rootRef', ['FirebaseUrl', Firebase])
  </code></pre>
  
  <p>So what I finally need is a working Google OAuth with Firebase 3.x and AngularJS.</p>