Passport strategy for authenticating with ALIS using the OAuth 2.0 API
npm install passport-alis
const passport = require('passport');
const ALISStrategy = require('passport-alis').ALISStrategy;
passport.use(new ALISStrategy({
clientID : <ALIS_APP_ID>,
clientSecret : <ALIS_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.
});
With this module, you don't have to do anything to get accessToken. As you see above, you have already obtained accessToken and refreshToken. So this process is not required with this module.
MIT License. Please see the LICENSE file for details.
Developed by hoosan(@hoosan16)