I hereby claim:
- I am jaredhanson on github.
- I am jaredhanson (https://keybase.io/jaredhanson) on keybase.
- I have a public key whose fingerprint is 422C F645 48FD 1733 CBFA D7F9 8949 87C2 FD3C D2A2
To claim this, I am signing this object:
Verifying my Blockstack ID is secured with the address 1ASvMCiQpDzZ63crdCkgTUPCdfHjqbd65U https://explorer.blockstack.org/address/1ASvMCiQpDzZ63crdCkgTUPCdfHjqbd65U |
I hereby claim:
To claim this, I am signing this object:
Verifying that +jaredhanson is my Bitcoin username. You can send me #bitcoin here: https://onename.io/jaredhanson |
var express = require('express'), | |
passport = require('passport'), | |
TwitterStrategy = require('passport-twitter').Strategy, | |
ensureLoggedIn = require('connect-ensure-login').ensureLoggedIn, | |
app = express(); | |
app.use(express.static(__dirname + '/public')); | |
app.use(express.cookieParser()); | |
app.use(express.session({ secret: 'keyboard cat' })); | |
app.use(passport.initialize()); |
// mapping relmeauth provider support to local URLs for initiating | |
// authentication, using OAuth, OAuth 2.0, or just about anything else | |
passport.use(new RelmeStrategy({ | |
'twitter.com': '/auth/twitter' | |
'facebook.com': '/auth/facebook' | |
}, | |
function(token, profile, done) { | |
// relme auth is mostly a discovery mechanism, which redirects | |
// the the highest-priority, supported provider. The verify | |
// callback would likely be handled best by the configured |
// Based off example code from Hal Robertson | |
// https://github.com/halrobertson/test-restify-passport-facebook | |
// See discussion: https://groups.google.com/forum/?fromgroups#!topic/passportjs/zCz0nXB_gao | |
var restify = require('restify') | |
// config vars | |
var FB_LOGIN_PATH = '/api/facebook_login' | |
var FB_CALLBACK_PATH = '/api/facebook_callback' | |
var FB_APPID = '<<YOUR APPID HERE>>' |