Skip to content
Oauth2.0 npm package for Yahoo! JAPAN corresponds to YConnect
JavaScript Perl Makefile
Find file
Latest commit 84caf38 Yohei Yamaguchi bump up version 1.0.6
Failed to load latest commit information.
examples/login udpated the example to support the new userinfo API response
test Version 1.0.4
.gitignore fixed test cases
.travis.yml Version 1.0.4
LICENSE Make npm package
Makefile fixed update README
config.js Version 1.0.4 Fix: doesn't work when using with npm 3
package.json bump up version 1.0.6

passport-yj - OAuth2.0 npm package for Yahoo! JAPAN YConnect

Build Status



Passport strategy for authenticating with YConnect using the OAuth 2.0 API

This module can be used with passport in Node.js. You can integrate into below applications or frameworks. Connect-style middleware, including Express.


$ npm install passport-yj


Configuration Strategy

This YConnect passport module requires your application' id. You can get this id from YConnect admin

Authorization Endpoint

var passport = require('passport');

passport.use(new YJStrategy({
    clientID     : <YAHOO_JAPAN_APP_ID>,
    clientSecret : <YAHOO_JAPAN_APP_SECRET>,
    callbackURL  : <CALL_BACK_URL>,
}, 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

Token Endpoint

With this module, you don't have to do anything to get accessToken. As you see above, you have already obtain accessToken and refreshToken. So this process is not required with this module.


MIT License. Please see the LICENSE file for details.

Something went wrong with that request. Please try again.