|
发表于 2023-5-17 16:37:30
|
显示全部楼层
这个文字版的oauthClients配置--单微信扫码登录,根据最新的微信文档 {$openid} 需要自己去实现以下,不然还是不能成功
"oauthClients": [
{
"enable": true,
"name": "微信登录",
"displayName": "微信绑定",
"icon": "https://open.weixin.qq.com/zh_CN/htmledition/res/assets/res-design-download/icon64_appwx_logo.png",
"clientId": "xxxxxxxx",
"clientSecret": "xxxxxxxxx",
"authAddress": "https://open.weixin.qq.com/connect/qrconnect",
"authParameter": "appid={$client_id}&response_type=code&scope=snsapi_login&state=STATE",
"authMethod": "GET",
"tokenAddress": "https://api.weixin.qq.com/sns/oauth2/access_token",
"tokenParameter": "appid={$client_id}&secret={$client_secret}&code={$code}&grant_type=authorization_code",
"tokenMethod": "GET",
"tokenType": "json",
"infoAddress": "https://api.weixin.qq.com/sns/userinfo",
"infoParameter": "access_token={$access_token}&openid={$openid}",
"infoMethod": "GET",
"infoType": "json",
"infoCredentialField": "openid",
"infoScriptText": "",
"bindingEnable": true,
"bindingField": "open1Id"
} |
|