Skip to content

Instantly share code, notes, and snippets.

@Lewuathe
Created October 25, 2013 11:35
Show Gist options
  • Select an option

  • Save Lewuathe/7153293 to your computer and use it in GitHub Desktop.

Select an option

Save Lewuathe/7153293 to your computer and use it in GitHub Desktop.
passport-yj test
var passport = require('passport');
var YJStrategy = require('../lib/passport-yj/strategy.js');
passport.use(new YJStrategy({
clientID : <CLIENT_ID>,
clientSecret : <CLIENT_SECRET>,
callbackURL : "http://lewuathe.github.io",
}, function(accessToken, refreshtoken, profile, done){
// With this accessToken you can access user profile data.
// In the case that accessToken is expired, you should
// regain it with refreshToken. So you have to keep these token
// safely. done will get user profile data such as openid in YConnect
console.log(profile); <- これ!!
process.nextTick(function() {
return done(null, profile);
});
}));%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment