Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问pc扫码微信登陆的接口是哪个?在哪个demo中,谢谢。 #3076

Open
4 of 32 tasks
mimimiaomiao1 opened this issue Sep 30, 2024 · 1 comment
Open
4 of 32 tasks

Comments

@mimimiaomiao1
Copy link

此版块专为反馈 bug 及提交需求服务,不负责解答开发问题,请勿发表开发问题,
如果您需要这方面的帮助,请移步问答社区https://weixin.senparc.com/QA

问题描述
重现问题步骤(如果可以)
  1. ...
  2. ...
微信官方文档 URL
微信官方文档快照(直接复制关键内容到下方)
发现问题的模块
  • Senparc.Weixin 版本:
  • Senparc.Weixin.MP 版本:
  • Senparc.Weixin.MP.MVC 版本:
  • Senparc.Weixin.Open 版本:
    - [ ] Senparc.Weixin.QY 版本:
  • Senparc.Weixin.Work 版本:
  • Senparc.Weixin.WxOpen 版本:
  • Senparc.Weixin.Cache.Redis 版本:
  • Senparc.Weixin.Cache.Memcached 版本:
  • Senparc.Weixin.Tenpay 版本:
  • Senparc.WebSocket 版本:
  • 其他模块:
模块对应的 .net 版本
  • .net 3.5
  • .net 4.0
  • .net 4.5+
  • .net standard 2.0 / 2.1
  • .net core 1.x
  • .net core 2.x
  • .net core 3.x
  • .net 5.x / 6.x
  • .net 7.0
开发环境
  • Visual Studio 2019
  • Visual Studio 2022
  • Visual Studio Code
  • 其他:
缓存环境
  • 服务器内存缓存(默认)
  • Redis 版本:
  • Memcached 版本:
  • 其他:
系统环境
  • Windows,版本:
  • Linux,版本:
  • Mac,版本:
  • 其他:
联系方式

Email:

(也可将问题地址及联系方式发送到 [email protected]

发布问题后,请保持对 issue 的关注,有时会有需要进一步沟通的信息,很长时间内没有得到答复的 issue 将被关闭。

@JeffreySu
Copy link
Owner

PC 扫码登录有两种方式,一种是使用开放平台进行登录,然后会根据你自定义的 URL 回调一个 code 参数给你,然后你用 AccessToken 去接口获取信息(需要仔细按照官方文档配置)。另外一种更加推荐的方式是使用公众号自身的能力,其中也有两个方法:
1、使用 OAuth(推荐):PC 页面显示 OAuth 二维码并开始轮询,用户手机上授权完成之后,轮询到对应用户信息并进行自动登录(关于 OAuth2 可以可参考 Sample 中的 OAuth2Contoller.cs)
2、直接使用公众号的场景码扫码:和上一步一样,不同的事显示的是公众号的带场景码的二维码,扫码之后使用 OpenId 进行用户身份确认,其他过程和 OAuth2 一致。

可以参考文章:https://blog.csdn.net/qq_46073180/article/details/135923588

无论何种方式,还是都要先理解官方文档的要求。如果有任何问题欢迎继续提问。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants