Skip to content

carlhuth/Angular-Firebase-Cordova-seed-with-simpleLogin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

Angular-Firebase-Cordova-seed-with-simpleLogin

An AngularJS and Firebase (with routing) seed generated by Yeoman, with Facebook simpleLogin

Getting started

Make sure you have Yeoman installed with the AngularJS-generator and the AngularFire-generator. I also use Cordova/Phonegap to build my webapp to native mobile platforms.

In this example I use android platform, Facebook login and routing in AngularJS.

1. Generate a seed and needed tools

cordova create loginExample com.example.hello AngularFireLogin
cd loginExample
cordova platform add android
mkdir dev && cd dev
yo angular
yo angularfire

Prompts asked on angularfire

  • [?] Name of your Firebase instance: (required) from your URL: http://INSTANCE.firebaseio.com
  • [?] Shall I include FirebaseSimpleLogin? Y
  • [?] Which providers shall I install? Facebook (select from a list of simple login providers you have enabled for your Firebase)
  • [?] Shall I include routeSecurity? Y (allows you to specify authRequired on a route and force user to log in before they can view it)
  • [?] Shall I create a rudimentary login screen? Y (this creates views/login.html and controllers/login.js, which provide registration (for password auth) and authentication)

2. Enable authentication with Facebook in your application

3. Build on mobile device with Cordova/Phonegap

  • Depending on what version of the generators, you may have to tweak some code and and add a logout button and a controller to it.
  • Remember to include in your index.html:
<script src="cordova.js"></script> 
  • SimpleLogin requires inAppBrowser.
cordova plugin add org.apache.cordova.inappbrowser
  • Build your code with grunt build and replace the code in your www folder with the files in your dist folder. Then it should be ready:
cordova run android

About

An AngularJS and Firebase (with routing) seed generated by Yeoman, with Facebook simpleLogin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 79.8%
  • Makefile 6.8%
  • JavaScript 4.3%
  • Objective-C 3.9%
  • HTML 1.9%
  • C# 1.4%
  • Other 1.9%