You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

eoh.oauth.extensions

Package Overview
Dependencies
Maintainers
0
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

eoh.oauth.extensions

0.1.2024.509-beta1413
nugetNuGet
Version published
Maintainers
0
Created
Source

EOH.OAuth

第三方 OAuth2 授权登录,QQ、微信开放平台(Weixin)、微信公众平台(WeixinMP)、微博(Weibo)、淘宝(Taobao)、支付宝(Alipay)、钉钉(DingTalk)、飞书(Feishu)、码云(Gitee)、GitHub、微软(Microsoft )、StackOverflow、谷歌(Google)

安装 (NuGet)

Install-Package EOH.OAuth.Extensions

支持第三方登录

三方参考文档应用申请
QQ参考文档应用申请
微信开放平台(WeixinOpen)参考文档应用申请
微信公众平台(WeixinMP)参考文档应用申请
微博(Weibo)参考文档应用申请
淘宝(Taobao)参考文档应用申请
支付宝(Alipay)参考文档应用申请
钉钉(DingTalk)参考文档应用申请
飞书(Feishu)参考文档应用申请
码云(Gitee)参考文档应用申请
GitHub参考文档应用申请
微软(Microsoft)参考文档应用申请
Stack Overflow参考文档应用申请
谷歌(Google)参考文档应用申请

功能

  • 微信开放平台(WeixinOpen)
  • 微信公众平台(WeixinMP)
  • 微博(Weibo)
  • 淘宝(Taobao)
  • 支付宝(Alipay)
  • 钉钉(DingTalk)
  • 飞书(Feishu)
  • 码云(Gitee)
  • GitHub
  • 微软(Microsoft)
  • Stack Overflow
  • 谷歌(Google)

变更

  • 2024.05.07
    • 初步完成OAuth授权登录服务

使用

//获取三方登录授权地址
var service = new OAuthLoginService(httpClientFactory, options);
service.OptionsFuncCall = (OAuthType type) => type switch
            {
                OAuthType.WeixinMP => new OAuthOptions
                {
                    AppId = "AppId",
                    AppKey = "AppKey",
                    RedirectUri = "RedirectUri",
                    Scope = "snsapi_login"
                }.ToJson(),
                OAuthType.WeixinOpen => new OAuthOptions
                {
                    AppId = "AppId",
                    AppKey = "AppKey",
                    RedirectUri = "RedirectUri",
                    Scope = "snsapi_login"
                }.ToJson(),
                _ => string.Empty
            };
 service.InitConfig(OAuthType.WeixinOpen);
var url = service.GetAuthorizeUrl(OAuthType.WeixinOpen, "state");
//获取三方登录用户信息
var user = await service.AuthorizeCallback(OAuthType.WeixinOpen, "code", "state");

Keywords

EOH.OAuth.Extensions

FAQs

Package last updated on 09 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts