auth0/passport-yj

Name: passport-yj

Owner: Auth0

Description: Oauth2.0 npm package for Yahoo! JAPAN corresponds to YConnect

Forked from: Lewuathe/passport-yj

Created: 2018-01-03 14:54:03.0

Updated: 2018-01-03 14:54:05.0

Pushed: 2018-02-23 17:01:02.0

Homepage: null

Size: 56

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

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

Build Status npm

NPM

Introduction

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.

Install
$ npm install passport-yj
Usage
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.

License

MIT License. Please see the LICENSE file for details.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.