Skip to content

OIDC from environment variables is skipped, with no log, when the button colour variables are unset #991

Closed

Description

@Thoroslives

Environment: PinePods 0.9.0 Docker image (madeofpendletonwool/pinepods:latest), PostgreSQL, Authentik as the OIDC provider.

What happens

I set the six essential OIDC variables, plus OIDC_BUTTON_TEXT and OIDC_SCOPE. The login page showed only the username and password form. GET /api/data/public_oidc_providers returned an empty list, the OIDCProviders table stayed empty, and the logs said nothing about OIDC.

Why

startup/startup.sh exports every OIDC variable whether it is set or not, for example export OIDC_BUTTON_COLOR=${OIDC_BUTTON_COLOR} on line 49. So an unset variable reaches the API as an empty string.

In rust-api/src/config.rs, the default only applies when the variable is missing:

env::var("OIDC_BUTTON_COLOR").ok().or_else(|| Some("#000000".to_string()))

An empty string gives Some(""), so the default never applies. OIDCConfig::is_configured (line 89) needs button_color and button_text_color to be non-empty. It returns false, and init_oidc_from_env skips with a debug! line only.

OIDC_ICON_SVG takes the same path. The provider row is stored with an empty icon rather than null. web/src/pages/login.rs line 1986 renders the icon slot for Some(""), and the empty slot pushes the button text off centre.

Workaround

Set OIDC_BUTTON_COLOR and OIDC_BUTTON_TEXT_COLOR explicitly. For the icon, set the provider's icon to null in the database.

Suggested fix

Treat an empty variable as unset in config.rs, for example .ok().filter(|s| !s.trim().is_empty()) before the default. Exporting only the variables that are set in startup.sh would work too. A warning in the log when some OIDC variables are set but the provider is skipped would make this easy to spot.

These lines are unchanged on main as of 09c3dcd.

Activity

  1. madeofpendletonwool commented on Oct 27, 2026

    @madeofpendletonwool
    Owner

    Fixed in #1036 - There was a bug with unset variables that broke the whole thing. Will be released officially with the next release coming soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions