Myvas.AspNetCore.Authentication.WeixinOpen 7.0.11

dotnet add package Myvas.AspNetCore.Authentication.WeixinOpen --version 7.0.11
NuGet\Install-Package Myvas.AspNetCore.Authentication.WeixinOpen -Version 7.0.11
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Myvas.AspNetCore.Authentication.WeixinOpen" Version="7.0.11" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Myvas.AspNetCore.Authentication.WeixinOpen --version 7.0.11
#r "nuget: Myvas.AspNetCore.Authentication.WeixinOpen, 7.0.11"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Myvas.AspNetCore.Authentication.WeixinOpen as a Cake Addin
#addin nuget:?package=Myvas.AspNetCore.Authentication.WeixinOpen&version=7.0.11

// Install Myvas.AspNetCore.Authentication.WeixinOpen as a Cake Tool
#tool nuget:?package=Myvas.AspNetCore.Authentication.WeixinOpen&version=7.0.11

Myvas.AspNetCore.Authentication Family

QQConnect WeixinOpen WeixinAuth

  • QQConnect: Here
  • WeixinOpen: this repo
  • WeixinAuth: Here

What's this?

An ASP.NET Core authentication middleware for https://open.weixin.qq.com (微信开放平台/微信扫码登录)

  • 须微信开放平台(open.weixin.qq.com)账号。
  • 用户可使用微信扫码并确认后登入网站。

How to Use?

0.Create account

在微信开放平台(https://open.weixin.qq.com)上创建网站应用,配置授权回调域(例如:auth.myvas.com ),记下AppId,获取AppSecret。

1.nuget

2.Configure

    app.UseAuthentication();

3.ConfigureServices

services.AddAuthentication()
    // using Myvas.AspNetCore.Authentication;
    .AddWeixinOpen(options => 
    {
        options.AppId = Configuration["WeixinOpen:AppId"];
        options.AppSecret = Configuration["WeixinOpen:AppSecret"];

        options.CallbackPath = "/signin-weixinopen"; //默认
    };
说明:
(1)同一用户在同一微信公众号即使重复多次订阅/退订,其OpenId也不会改变。
(2)同一用户在不同微信公众号中的OpenId是不一样的。
(3)若同时运营了多个微信公众号,可以在微信开放平台上开通开发者账号,并在“管理中心/公众账号”中将这些公众号添加进去,就可以获取到同一用户在这些公众号中保持一致的UnionId。

Dev

Demo

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
7.0.11 134 9/17/2023
6.0.3 596 3/24/2022
6.0.2.20222 434 2/22/2022
3.1.3.3 627 4/10/2020
3.1.0.2 579 12/14/2019
3.1.0.1 484 12/13/2019
3.0.100-alpha3 360 10/25/2019
2.2.1027 471 10/24/2019
2.1.1025 582 10/24/2019
2.1.802 839 10/22/2019
2.1.509 595 4/6/2019
2.1.508 733 4/6/2019
2.1.507 775 4/6/2019
2.1.506 553 3/30/2019
2.1.504 568 3/10/2019
2.1.415-beta1 539 11/22/2018
2.1.414 718 10/15/2018