2.2K Star 15.5K Fork 9.3K

JEECG / jeecg-boot

 / 详情

oauth2 钉钉无法登录

已完成
创建于  
2022-06-10 14:33
版本号:

3.2.0

问题描述:

按照说明文档配置OAUTH2登录
更改了 VUE_APP_API_BASE_URL=http://w1234zq.vaiwan.cn/jeecg-boot

使用网页登录可以成功,登录之后控制台一直报以下错误,
如果使用VUE_APP_API_BASE_URL=http://localhost:8080/jeecg-boot 则没有错误

[http-nio-8080-exec-3] INFO o.jeecg.modules.system.controller.LoginController:460 - 获取验证码,Redis checkCode = r1Xx,key = 1654842181770
[http-nio-8080-exec-6] INFO o.j.c.modules.redis.writer.JeecgRedisCacheWriter:113 - redis remove key:sys:cache:user::admin
[http-nio-8080-exec-9] INFO org.jeecg.config.shiro.ShiroRealm:97 - ————————身份认证失败——————————IP地址: 127.0.0.1,URL:/jeecg-boot/error
[http-nio-8080-exec-6] INFO org.jeecg.config.shiro.ShiroRealm:97 - ————————身份认证失败——————————IP地址: 127.0.0.1,URL:/jeecg-boot/error

截图&代码:

输入图片说明

2022-06-10 14:27:46.380 [http-nio-8080-exec-2] INFO o.j.modules.system.controller.ThirdLoginController:339 - oauth2 login url:https://login.dingtalk.com/oauth2/auth?redirect_uri=http%3A%2F%2Fweihaizq.vaiwan.cn%3A8081%2Fjeecg-boot%2Fsys%2FthirdLogin%2Foauth2%2Fdingtalk%2Fcallback&response_type=code&client_id=dingwlyrwjzuw7xd5ruh&scope=openid&state=http://192.168.0.160:3000
2022-06-10 14:27:47.091 [http-nio-8080-exec-10] INFO org.jeecg.config.shiro.ShiroRealm:97 - ————————身份认证失败——————————IP地址: 127.0.0.1,URL:/jeecg-boot/error
2022-06-10 14:27:50.967 [http-nio-8080-exec-3] INFO o.j.modules.system.controller.ThirdLoginController:371 - 【钉钉】OAuth2登录进入callback:authCode=b36ae62245d33ef2abd4115862e8d612, state=http://192.168.0.160:3000
2022-06-10 14:27:51.340 [http-nio-8080-exec-3] INFO com.jeecg.dingtalk.api.oauth2.JdtOauth2API:34 - [GET_USER_ACCESS_TOKEN] response:{"expireIn":7200,"accessToken":"9a7c7b37183a317aa1c1086963c58994","refreshToken":"cde3a47ee0183f288bfc122d364ede29"}
java.io.IOException: Server returned HTTP response code: 403 for URL: https://api.dingtalk.com/v1.0/contact/users/me
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1900)
输入图片说明

友情提示(为了提高issue处理效率):

  • 未按格式要求发帖,会被直接删掉;
  • 请自己初判问题描述是否清楚,是否方便我们调查处理;
  • 针对问题请说明是Online在线功能(需说明用的主题模板),还是生成的代码功能;
  • 描述过于简单或模糊,导致无法处理的,会被直接删掉;

评论 (5)

weihaiodoo 创建了任务
weihaiodoo 修改了描述
展开全部操作日志

我这里试的结果是,可以通过dingding登录并回调正常,但又要开通手机绑定,不清楚手机绑定是不是也要开通什么api权限。
yudao的第三方接入不需要手机绑定,在profile里面先自行绑定钉钉就行了。

你这是vue3?

已修复,待新版本发布

JEECG 任务状态待办的 修改为已完成

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(4)
57093 jeecg 1662000782 7966946 whxxri 1624244789
Java
1
https://gitee.com/jeecg/jeecg-boot.git
git@gitee.com:jeecg/jeecg-boot.git
jeecg
jeecg-boot
jeecg-boot

搜索帮助