Skip to content

OAuth providers are filtered out in useAuth before Login.tsx renders, so plugin OAuth sign-in options never appear #30

Closed

Description

@thezak48

Summary

When plugin OAuth providers are enabled, /api/v1/auth/providers correctly returns them, but the login page still does not show OAuth sign-in options (e.g. Discord). The frontend drops OAuth providers during auth state initialization.

Steps to reproduce

  1. Install and enable a plugin auth provider with OAuth mode (for example Discord).
  2. Enable its auth binding.
  3. Call /api/v1/auth/providers and confirm an OAuth provider is present, e.g.:
    • id: "plugin:3:discord"
    • mode: "oauth"
  4. Open the login page.

Expected behavior

The login page should show OAuth sign-in options such as “Sign in with Discord”.

Actual behavior

Only credential-based login options are shown, even though OAuth providers are returned by the API.

Root cause

In web/src/hooks/useAuth.tsx, providers are filtered before being stored:

setProviders((availableProviders ?? []).filter((entry) => entry.mode === "credentials"));

This removes OAuth providers before Login.tsx can render them.

Suggested fix

Keep both credentials and OAuth providers in auth state (remove this filter or make it mode-aware in UI rendering), and let Login.tsx render appropriate actions per provider mode.

Impact

  • OAuth plugin auth appears broken in the UI despite correct backend configuration.
  • Admins can see provider data in API responses, but users cannot initiate OAuth login from the login page.

Activity

  1. changed the title [-]Frontend bug on login page for plugins[/-] [+]OAuth providers are filtered out in useAuth before Login.tsx renders, so plugin OAuth sign-in options never appear[/+] on May 31, 2026
  2. Quick104 commented on May 31, 2026

    @Quick104
    Contributor

    I opened a draft fix in #32 that preserves OAuth providers from /api/v1/auth/providers so Login.tsx can render the plugin OAuth sign-in button.

    @thezak48 could you test #32 with your custom OAuth plugin and confirm the sign-in option appears and starts the OAuth flow correctly?

  3. thezak48 commented on May 31, 2026

    @thezak48
    ContributorAuthor

    Can confirm #32 solves this issue

  4. Quick104 commented on May 31, 2026

    @Quick104
    Contributor

    This has been addressed in #32, which has now been merged.

    The fix preserves usable OAuth providers for the login page while hiding OAuth-only providers when the server has not mounted the OAuth routes, avoiding the 404 case on instances without SILO_PUBLIC_URL configured.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions