Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Enterprise SSO Login Block for React

A sign-in page for a construction project manager that asks for the workspace address first: it looks the workspace up as you type, offers the right spelling for a typo and turns the button into Continue with SSO.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Ask for the workspace before the person, with this enterprise SSO login block for React with Base UI. It's the sign-in page of Girderwell, construction project management: the page's side rails run the full height of the screen and one band crosses it between two rules, holding one centered column. An Input Group draws the address, https:// at the start and .girder.example at the end, and its Field looks the workspace up in a typed list of three as you type; paste a whole address and it reads the workspace out of it. A match says single sign-on is required for that workspace, names the protocol in a Badge (SAML 2.0 or OpenID Connect) and the identity provider in text, and the Shine Button, the only colored control, becomes Continue with SSO. A name one or two edits away offers the right spelling, and a name nowhere near says so and offers Find your workspace. The press shows where a real sign-in would go, in the form's own space, and Back to sign in returns. It's built from Input Group, Field, Badge, Button, Shine Button and Guides, with a CSS entrance only. For business apps that send each customer to its own identity provider.

FAQ

What stays in the page, and how do I wire it to real workspaces?

All of it. The three workspaces are a typed list, Continue with SSO shows where a real sign-in would go and nothing redirects or is sent, and a polite status message says what the lookup found. In a product, look the workspace up on your server by the address the person typed, return its protocol and its sign-in endpoint, and redirect there with a SAML request or an OpenID Connect authorization request where the code says so. Replace the typed list with that lookup and keep the same states: found, one edit away, not found.

How does the lookup read what I type?

It takes the part of the text before the first dot, slash or space, lower-cases it and drops a leading https://, so a pasted address like https://aldermoss.girder.example/login finds aldermoss. A workspace that matches shows at once. "No such workspace" waits until typing pauses for half a second, or until the field loses focus, so calderpi never scolds you on the way to calderpike. A name within two edits of a real one offers it, and "Use calderpike" puts it in the field.

Doesn't a lookup tell strangers which workspaces exist?

It can, and that is a real trade-off. Workspace addresses are usually subdomains anyone can resolve, so naming a match gives little away. If yours are private, answer the same way for every name, say that a sign-in link will be emailed if the workspace exists, and rate-limit the lookup. This demo names matches because its list is typed and the hint under the field lists the three.

Why is Continue never disabled?

A disabled button can't explain itself and keyboard users can't reach it. Pressing Continue with an empty field or a workspace that doesn't exist marks the field invalid, writes one sentence under it and moves focus there. Typing clears the problem, and the field keeps a line for its problem even when there is none, so nothing below it moves.

Why two-letter tiles for Okta, Microsoft Entra ID and Google Workspace?

The providers are named in text only, each with a neutral tile of two typed letters (Ok, En, Gw), never a logo or a brand color. A provider's logo comes with its own usage rules; drop in the official mark where the code marks the icon slot if you have the right to use it.

How does it read on a phone and in a right-to-left language?

On a phone the https:// at the start of the address is hidden and the suffix stays, so the field keeps room for the name; the page is centered and the answer box keeps one height for every state, so the button never moves. In an RTL page the address, the suffix and the workspace names keep their own direction, and the rest of the text and the layout mirror.

  • Pro

    Domain Routing Login

    SSO and providers

    A sign-in page for workforce scheduling that reads the domain of your email and says how that company signs in: one required provider, a provider with a password option, a choice of two, or a password for a stranger.

  • Pro

    Federated Identity Login

    SSO and providers

    A provider chooser for a cloud console: a table of five identity providers with protocol, a health word and dot, and the last check, where a provider in maintenance can't be chosen and says why, and one button connects.

  • Pro

    SAML Redirect Login

    SSO and providers

    A sign-in page for payroll that walks through a SAML hand-off one step at a time: five read-only steps, a Now at address, Start redirect, Step and Cancel, and the facts and typed request the two sides agree on.

  • Pro

    Identity Provider Login

    SSO and providers

    A searchable list of ten sign-in providers in three groups with counts and a Connected before marker: typing filters, Enter or a press chooses, the button names the choice and shows where a real sign-in would go.

  • Pro

    An identifier-first sign-in for an invoicing app: one email field, a lookup against two typed accounts, then either the password step with the address kept as a badge or account creation with the address carried over.

  • Pro

    LDAP Directory Login

    SSO and providers

    A sign-in page for a company intranet against its directory: a choice of directory where DEV is offline with its reason, a second choice between DOMAIN user and user at domain that rewrites the field, and the server facts beside it.