这里的微信不同于上文中的企业微信,需要注册微信开发者帐号.
在 https://open.weixin.qq.com 注册微信开发者帐号.
创建网站应用:
审核通过后,可以到 系统设置 -> 安全配置 -> 单点登录 -> OAuth配置 中添加一个OAuth服务配置:
或者直接在服务配置文件token.json中配置 :
"oauthClients": [ { "enable": true, "name": "微信", "displayName": "微信", "icon": "https://open.weixin.qq.com/zh_CN/htmledition/res/assets/res-design-download/icon64_appwx_logo.png", "clientId": "wx********", "clientSecret": "****************", "authAddress": "https://open.work.weixin.qq.com/wwopen/sso/qrconnect", "authParameter": "redirect_uri={$redirect_uri}&appid={$clientId}&response_type=code&scope=snsapi_login&state=STATE", "authMethod": "GET", "tokenAddress": "https://api.weixin.qq.com/sns/oauth2/access_token", "tokenParameter": "appid={$clientId}&secret={$clientSecret}&code=${code}&grant_type=authorization_code", "tokenMethod": "POST", "tokenType": "json", "infoAddress": "", "infoParameter": "", "infoMethod": "GET", "infoType": "json", "infoCredentialField": "openId", "infoScriptText": "", "bindingEnable": false, "bindingField": "open1Id" } ]
上一篇:移动办公-创建自定义企业微信应用
下一篇:钉钉-使用钉钉扫码登录O2OA