common wechat integration
- 通过内部接口获得微信的授权页面
POST /wechatpivot/api/apps/:alias/oauth-snsapi-base-url
{ "redirect": "https://app.example.com/wechat-login/page" }
{
"url": "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wechatappid&redirect_uri=https%3A%2F%2Fwechatpivot.example.com%2Fwechatpivot%2Fapps%2Falias%2Foauth%3Fredirect%3Dhttps%253A%252F%252Fapp.example.com%252Fwechat-login%252Fpage&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
}
-
授权后回跳 pivot
https://wechatpivot.example.com/wechatpivot/apps/alias/oauth?code=access-token&redirect=https%3A%2F%2Fapp.example.com%2Fwechat-login%2Fpage
,pivot 通过 code=access-token 获取用户信息,并保存在 session 里,仍然用 code 做 key -
pivot 回跳应用的 /wechat-login/{page} 页面,通过内部接口通过 code 获取用户信息,pivot 将 session 中的用户信息返回,并清空该 key
and the corresponding mockup
location ~ ^/wechatpivot/apps/[0-9a-z]+/oauth {
proxy_pass http://wechatpivot:7001;
}
即原 wechat-api-debug
项目
Electron App:微信公众平台接口调试工具 http://mp.weixin.qq.com/debug/ 增强版(可调试本地,对码农友好、等)
由于 Google will kill chrome apps,原 Chrome App 不再维护。
-
本项目基于
Element-UI
,尽量不在样式上做额外调整。 -
代码框架和结构来自于
Electron Vue Template
,关于开发方式暂时详见其文档。 -
目前处于从
Chrome App + Vue@1
往Electron + Vue@2
的迁移过程中,如需使用需要通过开发的方式,即npm run dev
,迁移过程完成后会提供 macOS 下的安装包. -
未来有可能提供或不提供 macOS App Store 下载,看情况。
-
目前只实现了我工作中最常用的一些场景,会渐渐补全,如有急需请提 issue 或 pr