/Authenticate.me-Node-Server

Node server for authenticate.me

Primary LanguageJavaScript

Authenticate.me app Back end node server + Parse.com database

This project is to support the front end code for Authenticate.me-client-cordova-ionic.

Using this project

You'll need to download nodejs

1. Parse.com / instagram / twitter accounts

  • This project uses parse.com as a database therefore you'll need to create an account at parse.com.

Once your account created, create an app (The name of the app doesn't matter, you'll only need the api keys, found under settings > keys).

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

2. Clone this repo

 git clone https://github.com/malikov/Authenticate.me-Node-Server.git

Then navigate to the repo :

 cd Authenticate.me-Node-Server

3. Dependencies

Run :

 npm install

This should install all dependencies for the project.

4. Configuration

in the config.js file change the appropriate configuration variables for the twitter, instagram and parse.com app.

Replace for twitter

	config.twitter.consumerKey = [YOUR TWITTER CLIENT ID];
	config.twitter.consumerSecret = [YOUR TWITTER CLIENT SECRET]
	config.twitter.callbackURL = [YOUR TWITTER URL CALLBACK];

Replace for instagram

	config.instagram.clientID = [YOUR INSTAGRAM CLIENT ID];
	config.instagram.clientSecret = [YOUR INSTAGRAM CLIENT_SECRET];
	config.instagram.callbackURL = [YOUR INSTAGRAM URL CALLBACK];

Replace for parse.com

	config.parse.appId = ['PARSE_API_KEY_ID'];
	config.parse.jsKey = ['PARSE_API_JS_KEY'];
	config.parse.masterKey = ['PARSE_MASTER_KEY'];

Then run:

	node bin/www

the server should launch at localhost:3000.

Note : in order to test the oauth (instagram / twitter) authentication locally you'll want to change your host file on your windows machine (or use nginx with some reverse proxy settings) to match the url used for the callback.

For instance if I was to test the app locally I'd change the host to make sure 127.0.0.1 points to authenticate-app-me.herokuapp.com (therefore accessing the server locally would yield : http://authenticate-app-me.herokuapp.com:3000 ). Then I'd change the callback url to match : authenticate-app-me.herokuapp.com:3000.

once the server is live you can navigate to /oauth/instagram or oauth/twitter to test the login

TODO

tests

add facebook