myvas / AspNetCore.Authentication.QQConnect

An ASP.NET Core authentication middleware: QQConnect for https://connect.qq.com (腾讯QQ互联平台/QQ登录)

Home Page:http://demo.auth.myvas.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Myvas.AspNetCore.Authentication Family

  • QQConnect: this repo

QQConnect GitHub (Pre-)Release Date NuGet

WeixinOpen GitHub (Pre-)Release Date NuGet

WeixinAuth GitHub (Pre-)Release Date NuGet

What's this?

An ASP.NET Core authentication middleware for https://connect.qq.com (腾讯QQ互联平台/QQ登录)

  • 须腾讯QQ互联平台(connect.qq.com)账号。
  • 用户可通过点击“QQ登录”图标按钮一键登入网站,或使用手机QQ程序扫码登入网站,当然,也可以输入QQ账号密码登入网站。

How to Use?

0.Create account

在腾讯QQ互联平台(https://connect.qq.com)上创建应用(网站应用,移动应用),并指定网站回调地址(例如:https://www.myvas.com/signin-qqconnect),记下AppId和AppKey。

1.nuget

2.Configure

    app.UseAuthentication();

3.ConfigureServices

services.AddAuthentication()
    // using Myvas.AspNetCore.Authentication;
    .AddQQConnect(options => 
    {
        options.AppId = Configuration["QQConnect:AppId"];
        options.AppKey = Configuration["QQConnect:AppKey"];

        options.CallbackPath = "/signin-qqconnect"; //default

        QQConnectScopes.TryAdd(options.Scope,
            QQConnectScopes.get_user_info,
            QQConnectScopes.list_album, //需要额外开通权限,暂未实现
            QQConnectScopes.upload_pic, //需要额外开通权限,暂未实现
            QQConnectScopes.do_like); //需要额外开通权限,暂未实现
    };

Dev

Demo Online

About

An ASP.NET Core authentication middleware: QQConnect for https://connect.qq.com (腾讯QQ互联平台/QQ登录)

http://demo.auth.myvas.com

License:MIT License


Languages

Language:C# 99.9%Language:Batchfile 0.1%