Oauth2 Provider must be enabled for Account Linking by login to work on Oauth2 Client #15051

Closed
opened 2025-11-02 11:28:59 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @uriesk on GitHub (Oct 24, 2025).

Description

When oauth2.ENABLED is false, the following happens to oauth2_client:

  • oauth login works with new accounts and auto registration
  • ACCOUNT_LINKING = auto still works, the accounts get linked on oauth login
  • but the unlink button in the user account settings doesn't work (403 Forbidden)
  • ACCOUNT_LINKING = login (default) doesn't work, the page for linking accounts returns 403 Forbidden

0d740a6a72/routers/web/web.go (L311)

Gitea Version

1.24.6

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

Image

Git Version

2.43.2

Operating System

Ubuntu 24.04.3 LTS

How are you running Gitea?

Downloaded binary

Database

MySQL/MariaDB

Originally created by @uriesk on GitHub (Oct 24, 2025). ### Description When oauth2.ENABLED is false, the following happens to oauth2_client: - oauth login works with new accounts and auto registration - ACCOUNT_LINKING = auto still works, the accounts get linked on oauth login - but the unlink button in the user account settings doesn't work (403 Forbidden) - ACCOUNT_LINKING = login (default) doesn't work, the page for linking accounts returns 403 Forbidden https://github.com/go-gitea/gitea/blob/0d740a6a7231b254306d0b1513ff27e32646cd5e/routers/web/web.go#L311 ### Gitea Version 1.24.6 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots <img width="1540" height="500" alt="Image" src="https://github.com/user-attachments/assets/a3fc84fe-8250-4ea7-96d6-618e5353de14" /> ### Git Version 2.43.2 ### Operating System Ubuntu 24.04.3 LTS ### How are you running Gitea? Downloaded binary ### Database MySQL/MariaDB
GiteaMirror added the type/bug label 2025-11-02 11:28:59 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Oct 25, 2025):

Maybe a regression of Disable unnecessary OpenID/OAuth2 elements (#18491) ?


A quick revert:

@wxiaoguang commented on GitHub (Oct 25, 2025): Maybe a regression of Disable unnecessary OpenID/OAuth2 elements (#18491) ? ---- A quick revert: * #35745
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#15051