Skip to content

Option to show only Hellō login on the EmDash admin login screen #1

Description

@dickhardt

The EmDash admin login page always renders passkey as the primary method with providers under "OR CONTINUE WITH" and a magic-link fallback. A site standardizing on Hellō wants the login screen to show only "ō Continue with Hellō".

There is no config for this today (verified against emdash-cms/emdash: LoginPage.tsx hardcodes the layout; the public /_emdash/api/auth/mode endpoint returns authMode + providers with no per-method visibility). The only exclusive mode is the transparent external-auth descriptor (Cloudflare Access style), which replaces the page entirely.

Proposed shape (belongs upstream in emdash-cms/emdash; tracked here for the Hellō integration):

emdash({
  authProviders: [hello({})],
  loginMethods: { passkey: false, magicLink: false }, // default: both true
})
  • mode.ts returns the enabled methods alongside providers.
  • LoginPage.tsx: when passkey is off and exactly one provider is configured, promote its button to the primary position; drop the divider and magic-link row.
  • Enforcement, not just cosmetics: gate the passkey and magic-link API routes when disabled.
  • Lockout valve: ?method=passkey on the login URL as a documented break-glass override (provider outage or client misconfiguration would otherwise lock out admins).

Plan: implement in the patched monorepo used for the blog test deployment, prove it there, then propose upstream via emdash-cms Discussion alongside the tokenVerifiers PR.

Activity

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