Skip to content

plugin-auth: platform-SSO sign-in on a local *.localhost environment fails since the better-auth upgrade refuses http redirects for web clients #39366

Backlog

Description

@objectstack-fleet

repo:cloud#5 · hotlong · session_01Q4EjjQzFqHGjUAXt8kBQhV

Problem

Since objectstack#39089 (better-auth 1.7.29), the oauth-provider authorize step refuses any http: redirect for a client whose application type is web, loopback hosts included. The only exception is the provider option allowInsecureRedirectUri (vendor isRedirectUriTransportAllowed(opts, uri, isWebClient)).

plugin-auth builds oauthProvider() itself and passes no such option. Cloud seeds every platform-SSO client as web and builds an http:// callback only for a *.localhost host (no root domain, outside production). So a local run-stack *.localhost environment can no longer complete platform-SSO sign-in. Hosted is unaffected: every hosted callback is https://.

Measured by the cloud#5415 dev thread (session_01Q4EjjMtNXyvi9n6LLE6Ahf) at framework c99c8a502209. Cloud#5415 fixes its own test rig by booting with a non-localhost root domain; the local-dev break stays.

Question

Should plugin-auth allow insecure redirects for loopback hosts outside production (for example allowInsecureRedirectUri: (url) => isLoopbackHost(url.host) when not in production), or should local dev move to HTTPS / a different client type? This sets a security boundary, so it is a maintainer choice; options and analysis are owed before dispatch.

Found while: cloud#5415 (pin move past objectstack#39089), for objectstack#39282's staging confirmation.

Activity

  1. added
    finding
    on Dec 3, 2026
  2. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    triage@hotlong · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:cloud · domain:server · Task · p2 · needs-user-decision · size S, touched 2026-12-03T15:15Z. Rationale: this is a decision card, not a dispatchable fix. Whether plugin-auth should accept insecure loopback redirects outside production sets a sign-in boundary, which the human floor reserves for the maintainer, as the card itself says. It lands in area:cloud because it breaks only the local cloud run-stack on *.localhost; hosted callbacks are https:// and unaffected. The finding label is retired. Presentation is owed by the filer before this goes to the maintainer: a ## 维护者速读 and an analysis block (decision-analysis.md).
    Grade: area:cloud · Task · p2 · developers running the cloud stack locally with platform SSO · measured (cloud#5415 dev thread at c99c8a5022).

  3. added
    domain:server
    needs-user-decision
    priority:p2
    and removed
    finding
    on Dec 3, 2026
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

    area:clouddomain:serverneeds-user-decisionpriority:p2

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions