Node.js / "Bring you own users" demo with Passport
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
lib
public
views
.gitignore
README.md
index.js
package.json

README.md

Bring you own users

This repository is a demo of a hull.io feature, that allows you to plug your existing pool of users into hull.io services.

There are two ways to achieve this:

  • Your users belong in your own DB, and you don't want to change anything
  • Your users log into your app via Facebook, Twitter...

This is an Node.js app built with Express, and it uses the npm module for hull: hull-node.

Install

npm install
npm start

Open your browser and point to the URL http://localhost:3000.

What you'll find

GET /use_hull

In this part of the demo, you will see how you can use the authentication features of hull to tell your server when a user has logged in.

The relevant code is located in ./lib/use_hull.js.

GET /use_passport

In the part of the demo, you will see how you can use your own authentication system and automatically login your current user to hull services. For this, we have used the passport library to authenticate the users.

The relevant code is located at ./lib/use_passport.js

Licence

MIT