Skip to content

Instantly share code, notes, and snippets.

Avatar

Jared Hanson jaredhanson

View GitHub Profile
View blockstack
Verifying my Blockstack ID is secured with the address 1ASvMCiQpDzZ63crdCkgTUPCdfHjqbd65U https://explorer.blockstack.org/address/1ASvMCiQpDzZ63crdCkgTUPCdfHjqbd65U
View keybase.md

Keybase proof

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:

View gist:e7a43b66d495fbe4012e
Verifying that +jaredhanson is my Bitcoin username. You can send me #bitcoin here: https://onename.io/jaredhanson
@jaredhanson
jaredhanson / gist:3989193
Created Oct 31, 2012
Node Knockout 2012 - Getting Started with Passport
View gist:3989193
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());
@jaredhanson
jaredhanson / gist:3854950
Created Oct 8, 2012
Sketch RelMeAuth strategy for Passport
View gist:3854950
// 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
@jaredhanson
jaredhanson / gist:2559730
Created Apr 30, 2012
Restify and Passport /cc Hal Robertson
View gist:2559730
// 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>>'
You can’t perform that action at this time.