passport-qyweixin
passport strategy for authenticating with hlg
Last updated 2 years ago by sharkseven .
MIT · Original npm · Tarball · package.json
$ cnpm install passport-qyweixin 
SYNC missed versions from official npm registry.

passport-qyweixin v1.0.3

##支持功能

  • 企业微信登录

安装

$ npm install passport-qyweixin

使用

Configure Strategy


 passport.use(new QYStrategy({
        appID: {APPID}, // corpid
        agentID: {agentID},
        secretKey: {secretKey}, // corpsecret
        state: {state} || 'login' // 默认 login
        redirectUrl: {redirectUrl},
        getuserdetail: {getuserdetail} || false // 获取用户相信信息
        passReqToCallback: {passReqToCallback} || false // 默认false
      },
      function(user, done) {
          if (user && user.userid) {
              done(null, user)
          } else {
              done(null, false)
          }
      }
));

Authenticate Requests

  router.get('/auth/xx', passport.authenticate('hlg', {
    failureRedirect: '/auth/fail',
    successReturnToOrRedirect: '/'
  }));

If no callbackURL is specified, the same request url will be used.

Authentication Callback

  router.get('/auth/wechat/hlg', passport.authenticate('hlg', {
    failureRedirect: '/auth/fail',
    successReturnToOrRedirect: '/'
  }));

License

Copyright (c) 2016 Sharkseven
Licensed under the MIT license.

Current Tags

  • 0.1.5                                ...           latest (2 years ago)

16 Versions

  • 0.1.5                                ...           2 years ago
  • 0.1.4                                ...           2 years ago
  • 0.1.3                                ...           2 years ago
  • 0.1.2                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
  • 0.0.9                                ...           2 years ago
  • 0.0.8                                ...           2 years ago
  • 0.0.7                                ...           2 years ago
  • 0.0.6                                ...           2 years ago
  • 0.0.5                                ...           2 years ago
  • 0.0.4                                ...           2 years ago
  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 33
Dependencies (4)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |