# angularFire simpleLogin with Ionic

**URL:** <https://forum.ionicframework.com/t/angularfire-simplelogin-with-ionic/4946>\
**Category:** ionic-v1\
**Created:** [May 29, 2014, 10:34am UTC](https://forum.ionicframework.com/t/angularfire-simplelogin-with-ionic/4946 "2014-05-29T10:34:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hodeyp](https://avatars.discourse-cdn.com/v4/letter/h/d6d6ee/32.png) [@hodeyp](https://forum.ionicframework.com/u/hodeyp)\
**Post date:** [May 29, 2014, 10:34am UTC](https://forum.ionicframework.com/t/angularfire-simplelogin-with-ionic/4946/1 "2014-05-29T10:34:32Z")

</div>

I am an Ionic newbie trying to get a handle on integrating angularFire with the Ionic framework. I have cloned the ionic-contrib-firebase-login git and followed the same pattern for setting up the login sequence for my app.

When running the app via the ‘ionic serve’ command line utility the login page is displayed and I can login accordingly with the redirect displaying the hime page. However when I run the same code on the iOS emulator or an iOS device the screen just goes blank after the login has succeeded. Looking at the logs it seems to be redirecting but i’m assuming the redirect won’t do anything on a mobile app?

Has anybody else managed to use the _ionic-contrib-firebase-login_ seed to build an iOS Firebase app? Would appreciate some pointers if you have!

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [May 29, 2014, 2:20pm UTC](https://forum.ionicframework.com/t/angularfire-simplelogin-with-ionic/4946/2 "2014-05-29T14:20:43Z")

</div>

A simple search should get you some examples.

> [@Authentication with Firebase Simple Login](http://forum.ionicframework.com/t/authentication-with-firebase-simple-login/1698/9):
>
> insert it in your controller. you can look at this, [https://www.firebase.com/docs/angular/reference.html](https://www.firebase.com/docs/angular/reference.html) // perform the login auth var chatRef = new Firebase('https://your-firebase-name.firebaseio.com'); var auth = new FirebaseSimpleLogin(chatRef, function(error, user) { if (error) { // an error occurred while attempting login console.log(error); } else if (user) { // user authenticated with Firebase console.log('User ID: ' + user.id + ', Pr…

---

<div class="post-metadata">

**Author:** ![hodeyp](https://avatars.discourse-cdn.com/v4/letter/h/d6d6ee/32.png) [@hodeyp](https://forum.ionicframework.com/u/hodeyp)\
**Post date:** [May 29, 2014, 2:39pm UTC](https://forum.ionicframework.com/t/angularfire-simplelogin-with-ionic/4946/3 "2014-05-29T14:39:42Z")

</div>

Thanks, searching the forums was my first port of call and did find some useful information as you have suggested.

However (apologies!), I missed a vital component out of the initial post - I am trying to authenticate using the google auth option. When I log in using email/password it works fine but if i try via oAuth then google redirects to the firebase callback and this results in me seeing blank page. If I run the app in the browser it works as it honours the redirect but when I do it from the iOS emulator I assume the redirect does not work. has anybody managed to get an oAuth authentication to work in the iOS emulator?

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [May 29, 2014, 2:58pm UTC](https://forum.ionicframework.com/t/angularfire-simplelogin-with-ionic/4946/4 "2014-05-29T14:58:13Z")

</div>

Have you tried doing this in the inappbrowser?

> **[OAuth Login](http://forum.ionicframework.com/t/oauth-login/4399)**
>
> I setup a local node.js server that handles OAuth authentication by using PassportJS. Basically the user clicks on a button and the following redirection are done: example.com/auth/google -\> Google Sign In process -\> Google redirect to...

Or check this

> **[Ionic Angularjs Firebase Simple Password Authentication Example](http://forum.ionicframework.com/t/ionic-angularjs-firebase-simple-password-authentication-example/4901)**
>
> Starting a play around app in ionic just a basic chat message app for friends while searching on Google i see there are many ways to go about this but which way is the right way? or preferred way? I'm pretty familiar with angular js and ionic ...

I don’t have much experience with OAuth login so I’m not sure how much help I can be

---

<div class="post-metadata">

**Author:** ![hodeyp](https://avatars.discourse-cdn.com/v4/letter/h/d6d6ee/32.png) [@hodeyp](https://forum.ionicframework.com/u/hodeyp)\
**Post date:** [May 30, 2014, 6:56am UTC](https://forum.ionicframework.com/t/angularfire-simplelogin-with-ionic/4946/5 "2014-05-30T06:56:28Z")

</div>

Thanks, will continue to dig. I suppose I was just wondering if anybody else had used the githib seed for this as I don’t see how the seed could work for anybody as it currently is. Will continue to dig around.
