/Authenticate.me-client-cordova-ionic

How to authenticate using username / password, instagram, twitter or facebook, in a hybrid app (ionic + cordova). This sample app is powered by a nodejs server :)

Primary LanguageJavaScript

Authenticate.me app front end (ionic, angularjs, cordova)

A starting project to achieve server side authentication for hybrid apps. This is the front end. You can either create your server side api based on the following blog post : http://www.frnchnrd.com/blog/ or reuse the authenticate.me server nodejs codebase.

Update cordova to 3.6.0

Note : you'll need the latest version of cordova (3.6.0) for the inAppBrowser plugin to work correctly with ios8 otherwise it will be broken.

Screenshots

Main Page

Sign In Page

SignUp Page

Instagram login page

Twitter login page

Profile page

User sidebar

Users list

APK

you can download the apk here

Using this project

The following steps assume your environment is android / ios ready. If you haven't downloaded the appropriate SDKs (ADT, or xcode) and setup the appropriate PATH variables (mostly for android), please do so before doing the steps below. You'll need nodejs installed as well.

1. Ionic / Cordova

make sure both ionic and cordova are installed on your machine if not run the following command :

 npm install -g cordova ionic

Note : if npm isn't defined you'll need to install node

2. Clone this repo

 git clone https://github.com/malikov/Authenticate.me-client-cordova-ionic.git

Then navigate to the repo :

 cd Authenticate.me-client-cordova-ionic

3. Dependencies

Run :

 npm install

This should install all dependencies for the project.

4. Add a platform

Once the dependencies installed, you'll need to add a platform (Warning this project has been tested for iOs and Android devices ony)

Run :

 ionic platform add android
 ionic platform add ios

Then to build the project run:

 ionic run android
 ionic run ios

5. Configuration

I'd start by looking at the AuthService and Constants.js file. The api url implemented on the client side for the login/registration needs to match the router's url on the server side

TODO

tests

add facebook add native sdk functionalities (i.e : use facebook or twitter's sdk if the app is installed on the phone use the native app otherwise fallback to window.open)