]> source.dussan.org Git - gitea.git/commit
use existing oauth grant for public client (#31015) (#31042)
authorGiteabot <teabot@gitea.io>
Tue, 21 May 2024 17:32:31 +0000 (01:32 +0800)
committerGitHub <noreply@github.com>
Tue, 21 May 2024 17:32:31 +0000 (17:32 +0000)
commite3390e244142a1fa014f985250f8b89b59eca99b
tree821b0f853a1315857f4c548540ef6bbe1e7dbd51
parent27a4c679921241ee7d6d321864e0285773ce6233
use existing oauth grant for public client (#31015) (#31042)

Backport #31015 by @denyskon

Do not try to create a new authorization grant when one exists already,
thus preventing a DB-related authorization issue.

Fix https://github.com/go-gitea/gitea/pull/30790#issuecomment-2118812426

Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
routers/web/auth/oauth.go