UI issue with oidc re-init #1510

Open
opened 2026-03-22 17:32:06 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @GuFFy12 on GitHub (Dec 4, 2025).

When my Linux system restarts, both Komodo and Authentik containers start simultaneously. If Komodo starts first, it tries to initialize the OIDC client, but the Authentik container hasn’t started yet.

Here’s the code from spawn_oidc_client_management:

pub async fn spawn_oidc_client_management() {
    let config = core_config();
    if !config.oidc_enabled
        || config.oidc_provider.is_empty()
        || config.oidc_client_id.is_empty()
    {
        return;
    }
    if let Err(e) = reset_oidc_client().await {
        error!("Failed to initialize OIDC client | {e:#}");
    }
    tokio::spawn(async move {
        loop {
            tokio::time::sleep(Duration::from_secs(60)).await;
            if let Err(e) = reset_oidc_client().await {
                warn!("Failed to reinitialize OIDC client | {e:#}");
            }
        }
    });
}

34a9f8eb9e/bin/core/src/auth/oidc/client.rs (L54)

Komodo tries to initialize the OIDC client and retries if it fails. When I check my logs, I see the error message but no warning, which makes me assume that the OIDC client has been initialized. However, in the UI, I continue to see the following message:

No login methods have been configured. See the [example config](https://github.com/moghtech/komodo/blob/main/config/core.config.toml) for information on configuring auth.

It seems that even though Authentik is correctly initialized and the OIDC client is working fine, the UI still shows that the login provider has not been configured. If I manually go into Chrome DevTools and trigger the “Login with OAuth” function, the authentication process proceeds successfully.
98d72fc908/frontend/src/pages/login.tsx (L28)

This indicates that the OIDC client is functioning properly, but the UI is not reflecting the updated state.

PS It would also be great if you could add an OAuth option to automatically redirect users to the authorization flow as soon as they open the web panel, without requiring them to click the OIDC login button.

Originally created by @GuFFy12 on GitHub (Dec 4, 2025). When my Linux system restarts, both Komodo and Authentik containers start simultaneously. If Komodo starts first, it tries to initialize the OIDC client, but the Authentik container hasn’t started yet. Here’s the code from spawn_oidc_client_management: ```rs pub async fn spawn_oidc_client_management() { let config = core_config(); if !config.oidc_enabled || config.oidc_provider.is_empty() || config.oidc_client_id.is_empty() { return; } if let Err(e) = reset_oidc_client().await { error!("Failed to initialize OIDC client | {e:#}"); } tokio::spawn(async move { loop { tokio::time::sleep(Duration::from_secs(60)).await; if let Err(e) = reset_oidc_client().await { warn!("Failed to reinitialize OIDC client | {e:#}"); } } }); } ``` https://github.com/moghtech/komodo/blob/34a9f8eb9ef305103b678c1b46782700313f637f/bin/core/src/auth/oidc/client.rs#L54 Komodo tries to initialize the OIDC client and retries if it fails. When I check my logs, I see the error message but no warning, which makes me assume that the OIDC client has been initialized. However, in the UI, I continue to see the following message: ```text No login methods have been configured. See the [example config](https://github.com/moghtech/komodo/blob/main/config/core.config.toml) for information on configuring auth. ``` It seems that even though Authentik is correctly initialized and the OIDC client is working fine, the UI still shows that the login provider has not been configured. If I manually go into Chrome DevTools and trigger the “Login with OAuth” function, the authentication process proceeds successfully. https://github.com/moghtech/komodo/blob/98d72fc908e4d576083de36804716129b4857e57/frontend/src/pages/login.tsx#L28 This indicates that the OIDC client is functioning properly, but the UI is not reflecting the updated state. PS It would also be great if you could add an OAuth option to automatically redirect users to the authorization flow as soon as they open the web panel, without requiring them to click the OIDC login button.
Author
Owner

@GuFFy12 commented on GitHub (Dec 4, 2025):

Image
@GuFFy12 commented on GitHub (Dec 4, 2025): <img width="1036" height="540" alt="Image" src="https://github.com/user-attachments/assets/df277242-10dd-4418-b903-b57ce24802a7" />
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/komodo#1510