413 Star 1.6K Fork 778

li.shengzhao / spring-oauth-server

 / 详情

oauth2 客户端模式获取token,有并发问题

Done
Opened this issue  
2018-11-28 17:31

在测试环境使用过程中,我们使用客户端模式来获取token,偶尔回出现 一个clientId 查询token的时候查出两条,导致获取token报错。

这个是具体的报错 error="server_error", error_description="Incorrect result size: expected 1, actual 2"

输入图片说明

Comments (2)

feng_codes createdtask

access_token 表增加唯一约束可解决此问题, SQL:

ALTER TABLE oauth_access_token ADD UNIQUE INDEX authentication_id(authentication_id);

monkeyk7 changed issue state from 待办的 to 已完成

Sign in to comment

Status
Assignees
Milestones
Pull Requests
Successfully merging a pull request will close this issue.
Branches
Planed to start   -   Planed to end
-
Top level
Priority
参与者(2)
7238 mkk 1578914473
Java
1
https://gitee.com/shengzhao/spring-oauth-server.git
git@gitee.com:shengzhao/spring-oauth-server.git
shengzhao
spring-oauth-server
spring-oauth-server

Search

141041 ab9339c7 1850385 141043 25c028d5 1850385