Myvas.AspNetCore.Authentication.WeixinOpen
7.0.11
.NET 5.0
This package targets .NET 5.0. The package is compatible with this framework or higher.
.NET Core 3.1
This package targets .NET Core 3.1. The package is compatible with this framework or higher.
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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Myvas.AspNetCore.Authentication Family
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 | Versions 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.
-
.NETCoreApp 3.1
- Microsoft.AspNetCore.Authentication.Twitter (>= 3.1.0)
- Newtonsoft.Json (>= 13.0.3)
-
net5.0
- Microsoft.AspNetCore.Authentication.Twitter (>= 5.0.0)
- Newtonsoft.Json (>= 13.0.3)
-
net6.0
- Microsoft.AspNetCore.Authentication.Twitter (>= 6.0.0)
- Newtonsoft.Json (>= 13.0.3)
-
net7.0
- Microsoft.AspNetCore.Authentication.Twitter (>= 7.0.0)
- Newtonsoft.Json (>= 13.0.3)
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 | 184 | 9/17/2023 |
6.0.3 | 612 | 3/24/2022 |
6.0.2.20222 | 446 | 2/22/2022 |
3.1.3.3 | 656 | 4/10/2020 |
3.1.0.2 | 608 | 12/14/2019 |
3.1.0.1 | 507 | 12/13/2019 |
3.0.100-alpha3 | 379 | 10/25/2019 |
2.2.1027 | 484 | 10/24/2019 |
2.1.1025 | 606 | 10/24/2019 |
2.1.802 | 875 | 10/22/2019 |
2.1.509 | 622 | 4/6/2019 |
2.1.508 | 759 | 4/6/2019 |
2.1.507 | 800 | 4/6/2019 |
2.1.506 | 574 | 3/30/2019 |
2.1.504 | 580 | 3/10/2019 |
2.1.415-beta1 | 560 | 11/22/2018 |
2.1.414 | 736 | 10/15/2018 |