Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use existing oauth grant for public client #31015

Merged
merged 3 commits into from
May 21, 2024

Conversation

denyskon
Copy link
Member

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

Fix #30790 (comment)

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 18, 2024
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 18, 2024
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label May 18, 2024
@denyskon denyskon added backport/v1.22 This PR should be backported to Gitea 1.22 backport/v1.21 This PR should be backported to Gitea 1.21 type/bug topic/authentication size/S Denotes a PR that changes 10-29 lines, ignoring generated files. modifies/go Pull requests that update Go code and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. modifies/go Pull requests that update Go code labels May 18, 2024
@denyskon denyskon added this to the 1.23.0 milestone May 18, 2024
@denyskon denyskon requested a review from wxiaoguang May 18, 2024 13:02
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 18, 2024
routers/web/auth/oauth.go Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 19, 2024
@denyskon denyskon added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label May 19, 2024
@lunny lunny removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label May 20, 2024
@pull-request-size pull-request-size bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 21, 2024
@github-actions github-actions bot added modifies/translation modifies/templates This PR modifies the template files labels May 21, 2024
@pull-request-size pull-request-size bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 21, 2024
@github-actions github-actions bot removed modifies/translation modifies/templates This PR modifies the template files labels May 21, 2024
@denyskon denyskon added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label May 21, 2024
@lunny lunny enabled auto-merge (squash) May 21, 2024 15:25
@lunny lunny merged commit 9c8c9ff into go-gitea:main May 21, 2024
26 checks passed
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request May 21, 2024
Do not try to create a new authorization grant when one exists already,
thus preventing a DB-related authorization issue.

Fix go-gitea#30790 (comment)

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request May 21, 2024
Do not try to create a new authorization grant when one exists already,
thus preventing a DB-related authorization issue.

Fix go-gitea#30790 (comment)

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label May 21, 2024
@denyskon denyskon deleted the fix/oauth-login branch May 21, 2024 16:25
lunny added a commit that referenced this pull request May 21, 2024
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 #30790 (comment)

Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
lunny added a commit that referenced this pull request May 21, 2024
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 #30790 (comment)

Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
zjjhot added a commit to zjjhot/gitea that referenced this pull request May 22, 2024
* giteaofficial/main:
  Add nix flake for dev shell (go-gitea#30967)
  [skip ci] Updated translations via Crowdin
  Fix wrong display of recently pushed notification (go-gitea#25812)
  use existing oauth grant for public client (go-gitea#31015)
  Fix automerge will not work because of some events haven't been triggered (go-gitea#30780)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/v1.21 This PR should be backported to Gitea 1.21 backport/v1.22 This PR should be backported to Gitea 1.22 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/go Pull requests that update Go code size/S Denotes a PR that changes 10-29 lines, ignoring generated files. topic/authentication type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants