Any way to manage OAuth2 apps via REST API? #3509

Closed
opened 2025-11-02 05:15:24 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @Ziars on GitHub (Jun 25, 2019).

  • Gitea version (or commit ref): 1.8.3
  • Git version: 2.22.0
  • Operating system: Ubuntu 16.04
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

Greetings!

I’m using Drone+Gitea (v.1.8.3) stack and just ran into a problem with automating the authorization process. To add an app I have to manually go to GUI (Settings => Applications), add the app through section “Manage OAuth2 Applications”, take the resulting ID and Secret for further usage in Drone. Authorization itself works fine, the problem is that I have lots of such Gitea instances, which are regularly created and deleted by scripts. So, without having a way of adding an app via API, I have to either add it manually on every Gitea instance, or use a rude INSERT into database. Is there a more graceful way, or maybe I’m missing something?

Thank you in advance.

Originally created by @Ziars on GitHub (Jun 25, 2019). - Gitea version (or commit ref): 1.8.3 - Git version: 2.22.0 - Operating system: Ubuntu 16.04 - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant Greetings! I’m using Drone+Gitea (v.1.8.3) stack and just ran into a problem with automating the authorization process. To add an app I have to manually go to GUI (Settings => Applications), add the app through section “Manage OAuth2 Applications”, take the resulting ID and Secret for further usage in Drone. Authorization itself works fine, the problem is that I have lots of such Gitea instances, which are regularly created and deleted by scripts. So, without having a way of adding an app via API, I have to either add it manually on every Gitea instance, or use a rude INSERT into database. Is there a more graceful way, or maybe I’m missing something? Thank you in advance.
GiteaMirror added the type/proposalmodifies/api labels 2025-11-02 05:15:24 -06:00
Author
Owner

@n0guest commented on GitHub (Jul 24, 2019):

Also, it'd be very good not only to create random credentials (as it now in Gitea UI). But also create your own - i.e. specify key and secret in API request.

PS: Are there any plans or milestone on this feature?

@n0guest commented on GitHub (Jul 24, 2019): Also, it'd be very good not only to create random credentials (as it now in Gitea UI). But also create your own - i.e. specify key and secret in API request. PS: Are there any plans or milestone on this feature?
Author
Owner

@lunny commented on GitHub (Jul 29, 2019):

@n0guest There is no plan to do this.

@lunny commented on GitHub (Jul 29, 2019): @n0guest There is no plan to do this.
Author
Owner

@6543 commented on GitHub (Sep 21, 2020):

closed by #11008 and released since 1.12.0

@6543 commented on GitHub (Sep 21, 2020): closed by #11008 and released since 1.12.0
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3509