393 Unstar Star 1.4K Fork 704

li.shengzhao / spring-oauth-server

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

Closed
feng_codes  Opened this issue

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

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

输入图片说明

7238 mkk 1578914473 total 2 participants

Comments (2)

7238 mkk 1578914473
monkeyk7 2019-08-28 18:19 member

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

ALTER TABLE oauth_access_token ADD UNIQUE INDEX authentication_id(authentication_id);

Sign in to comment

Assignees
Labels
Not set
Projects
Milestones
Branches
Planed to start
Not set
Planed to end
Not set
Top level
Priority
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