All Projects → qdsang → passport-qq

qdsang / passport-qq

Licence: MIT license
QQ connection authentication strategy for Passport and Node.js

Projects that are alternatives of or similar to passport-qq

Web Oauth App
第三方登录服务 Web OAuth 示例
Stars: ✭ 30 (-9.09%)
Mutual labels:  passport, qq
union
union login for wechat,weibo,qq,alipay with go
Stars: ✭ 23 (-30.3%)
Mutual labels:  qq
SocialSDK
iOS 实现sina(新浪)、wechat(微信)、qq(腾讯) 登录、分享功能,Share,ShareSDK,高仿友盟SocialSDK UI 实现,可自定义UI实现
Stars: ✭ 64 (+93.94%)
Mutual labels:  qq
mqr
茉莉QQ机器人(简称MQR),采用mirai的Android协议实现的QQ机器人服务,通过web控制机器人的启停和配置。
Stars: ✭ 71 (+115.15%)
Mutual labels:  qq
express-mvp
Express.js project template ready to go
Stars: ✭ 21 (-36.36%)
Mutual labels:  passport
todos-express-password
Todo app using Express and Passport for sign in with username and password.
Stars: ✭ 739 (+2139.39%)
Mutual labels:  passport
LeXun.Security.OAuth
用于 Asp.Net 和 Asp.Net Core 的OAuth2社交身份验证提供程序。支持支付宝,QQ,微信,百度等第三方登录
Stars: ✭ 19 (-42.42%)
Mutual labels:  qq
peerai-api
Peerism's Peer.ai API built with Truffle, Node.js, Express.js, Solidity, and Ethereum TestRPC
Stars: ✭ 18 (-45.45%)
Mutual labels:  passport
Sisters.WudiLib
C# 与 One Bot 协议实现通信。
Stars: ✭ 33 (+0%)
Mutual labels:  qq
discord-dashboard
Example of Discord Oauth2 - Complete with Discord Bot
Stars: ✭ 35 (+6.06%)
Mutual labels:  passport
Containerization-Automation
Study and Use of Containers and Automation Tools
Stars: ✭ 45 (+36.36%)
Mutual labels:  qq
QQ-Notify-Evolution
免ROOT优化QQ通知,支持多会话/多消息/多渠道,兼容手环手表。
Stars: ✭ 120 (+263.64%)
Mutual labels:  qq
YHThirdManager
一个快速、简单、易集成、扩展性好的社交化组件。摒弃友盟等三方库,使用原生SDK。支持微信支付、微信分享、微信登录、微信授权、QQ授权、QQ分享、QQ登录、新浪授权、新浪登录、新浪分享、微博评论、微博获取、支付宝支付。极大的减小了包体积;同时加入了自动管理提示框的功能
Stars: ✭ 41 (+24.24%)
Mutual labels:  qq
LoveTime
Python对QQ消息进行分析的小工具(👫)
Stars: ✭ 61 (+84.85%)
Mutual labels:  qq
laravel-api-boilerplate-passport
An API Boilerplate to create a ready-to-use REST API in seconds.
Stars: ✭ 20 (-39.39%)
Mutual labels:  passport
Shiro
基于OneBot协议的QQ机器人快速开发框架
Stars: ✭ 78 (+136.36%)
Mutual labels:  qq
Ariadne
一个优雅且完备的 Python QQ 自动化框架,基于 Mirai API HTTP v2。 Powered by Graia Project.
Stars: ✭ 234 (+609.09%)
Mutual labels:  qq
qqRobot.js
😊 QQ聊天机器人,使用JavaScript实现, 可以在安卓设备上运行。
Stars: ✭ 17 (-48.48%)
Mutual labels:  qq
uni-chat
uni-app + vue3.0 + typescript + vue-cli 仿手机QQ聊天 qq表情包
Stars: ✭ 55 (+66.67%)
Mutual labels:  qq
laravel-sso-passport
[DEPRECATED] A simple SSO (Single Sign On) system using the Laravel Framework with Passport API Authentication
Stars: ✭ 27 (-18.18%)
Mutual labels:  passport

Passport-qq

wiki.connect.qq

Passport strategy for authenticating with qq using the OAuth 2.0 API.

This module lets you authenticate using qq in your Node.js applications. By plugging into Passport, qq authentication can be easily and unobtrusively integrated into any application or framework that supports Connect-style middleware, including Express.

Installation

$ npm install passport-qq

Usage

Configure Strategy

The qq authentication strategy authenticates users using a qq account and OAuth 2.0 tokens. The strategy requires a verify callback, which accepts these credentials and calls done providing a user, as well as options specifying a client ID, client secret, and callback URL.

    passport.use(new qqStrategy({
        clientID: client_id,
        clientSecret: client_secret,
        callbackURL: "http://127.0.0.1:3000/auth/qq/callback"
      },
      function(accessToken, refreshToken, profile, done) {
        User.findOrCreate({ qqId: profile.id }, function (err, user) {
          return done(err, user);
        });
      }
    ));

Authenticate Requests

Use passport.authenticate(), specifying the 'qq' strategy, to authenticate requests.

For example, as route middleware in an Express application:

    app.get('/auth/qq',
      passport.authenticate('qq'),
      function(req, res){
        // The request will be redirected to qq for authentication, so this
        // function will not be called.
      });

    app.get('/auth/qq/callback', 
      passport.authenticate('qq', { failureRedirect: '/login' }),
      function(req, res) {
        // Successful authentication, redirect home.
        res.redirect('/');
      });

License

(The MIT License)

Copyright (c) 2011 Andy Shang

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].