Metrics
0
Watch 355 Star 1.1K Fork 557

li.shengzhao / spring-oauth-serverJavaGPL-2.0

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

Closed
feng_codes  Created at

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

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

输入图片说明

7238_mkk total 2 participants

Comments (2)

7238_mkk
monkeyk7 2019-08-28 18:19 member

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

ALTER TABLE oauth_access_token ADD UNIQUE INDEX authentication_id(authentication_id);

Sign in and comment

Assignee
Labels
Not set
Project
Milestone
Branch
Scheduled start
Not set
Scheduled end
Not set
Top level
Priority

Help Search