Adding OIDC auths soure via CLI requires GUI manual update. #6046

Closed
opened 2025-11-02 06:43:39 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @Coleslaw3557 on GitHub (Sep 24, 2020).

  • Git version: 1.12.4
  • Operating system: K8S (using official helm chart)
  • Database (use [x]):
    • [x ] PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

Hello, I am adding an oauth2 OIDC authentication source via the CLI with the following command:

gitea admin auth add-oauth --name keycloak --provider openidConnect --key git-client --secret $SECRET --auto-discover-url https://login.mydomain.net/auth/realms/merlin/.well-known/openid-configuration

The entry shows up correct under the GUI (screenshot below).

Unfortunately, when clicking the login with OIDC button at login, I am given the 500 error:

no provider for keycloak exists

The problem is resolved by clicking "update authentication source" under the GUI without making any changes.

To test, I tried running this command but without resolution:

gitea admin auth update-oauth --id 1 --name keycloak

I would expect that adding the the OIDC source via CLI would not require this extra step through the GUI.

Has anyone else had this issue?

Thank you kindly for any pointers.

Screenshots

image

Originally created by @Coleslaw3557 on GitHub (Sep 24, 2020). - Git version: 1.12.4 - Operating system: K8S (using official helm chart) - Database (use `[x]`): - [x ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description Hello, I am adding an oauth2 OIDC authentication source via the CLI with the following command: ``` gitea admin auth add-oauth --name keycloak --provider openidConnect --key git-client --secret $SECRET --auto-discover-url https://login.mydomain.net/auth/realms/merlin/.well-known/openid-configuration ``` The entry shows up correct under the GUI (screenshot below). Unfortunately, when clicking the login with OIDC button at login, I am given the 500 error: ``` no provider for keycloak exists ``` The problem is resolved by clicking "update authentication source" under the GUI without making any changes. To test, I tried running this command but without resolution: ``` gitea admin auth update-oauth --id 1 --name keycloak ``` I would expect that adding the the OIDC source via CLI would not require this extra step through the GUI. Has anyone else had this issue? Thank you kindly for any pointers. ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** --> ![image](https://user-images.githubusercontent.com/36211021/94195762-4c659100-fe68-11ea-941c-a6183717ba07.png)
GiteaMirror added the type/bug label 2025-11-02 06:43:39 -06:00
Author
Owner

@pat-s commented on GitHub (Oct 18, 2020):

This worked for me after restarting Gitea.

I would like to see configuration options directly in app.ini.

@pat-s commented on GitHub (Oct 18, 2020): This worked for me after restarting Gitea. I would like to see configuration options directly in `app.ini`.
Author
Owner

@noerw commented on GitHub (Dec 25, 2020):

fixed via #14116

@noerw commented on GitHub (Dec 25, 2020): fixed via #14116
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6046