Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

SSO Test and Enforce Success Block for React

A single sign-on confirmation inside an app panel: the connection's metadata with real copy buttons, a Test sign-in that passes locally and unlocks a Require SSO for everyone switch, and an alert dialog that confirms it.

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

Make the last step of an SSO setup safe with this confirmation panel for React with Base UI. It's the panel Gatehand, an access manager, shows after its SAML connection to Okta is set up: a header with one action, the Shine Button Done, over one framed card split in two and ruled by Guides. The first half is the connection: a Gatehand tile and an Okta tile (two letters each, never a logo) over the protocol, the entity ID and the sign-in URL in monospace, each with a Copy Button, and the certificate's end date. The second half is the order of things: Test sign-in runs a pass that unlocks a Switch, "Require SSO for everyone", and turning it on asks to confirm in an Alert Dialog. For identity setup, SAML and OIDC connections and any change that can lock people out.

FAQ

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

Nothing signs in and nothing is enforced. Test sign-in waits a moment and shows a typed result; the switch and the dialog change this page only, and a polite status message says so ("SSO is now required for everyone, in this demo. Nothing changed in Okta."). The copy buttons are real: they put the entity ID and sign-in URL on the clipboard. To wire it, run a real test sign-in through your identity provider in runTest, read the metadata from the connection, and call your API from confirm.

Why is the switch locked until the test passes?

Requiring SSO for everyone can lock people out if the connection is wrong, so the block makes you prove it works first. The switch stays off, with a line that says "Run the test first. This stays off until it passes.", and unlocks when the test passes. Turning it off again needs no question.

What does the confirmation do, and where does focus go?

Turning the switch on opens an Alert Dialog that says what changes (passwords stop working, anyone not set up in Okta is locked out) with Keep it optional and Require SSO. Escape and Keep it optional leave the switch off and put focus back on it; Require SSO turns it on, says so in the status message and keeps the page's height. The dialog is controlled with open and onOpenChange.

Is Okta's logo used?

No. The provider is named in text and drawn as a neutral two-letter tile in an icon slot, with a code comment that says to drop in a logo you have the rights to use. Never redraw a brand's mark.

How does it look on a phone?

The connection details come first, with each address wrapping inside its box, and the test sits under them. The two steps keep their numbers, the test result has a reserved line so the switch below it never moves, and Test sign-in is a full-width button.

  • Pro

    SAML Setup Settings

    Sign-in and security

    A SAML single sign-on setup sheet shown open over a drawn security page: copy two values, paste the provider's metadata and see what is found (including the certificate's end day read from the certificate), run a local test, then enforce.

  • Pro

    SSO Config Account

    Sign-in methods

    Move your account to company sign-in: what changes as a list of terms, three things to tick, a Shine Button that wakes when all hold and a dialog that asks for the company domain, then a Switch back until the password stops.

  • Pro

    Enterprise SSO Login

    SSO and providers

    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.

  • Pro

    A two-step sign-in confirmation page: what was turned on, eight single-use recovery codes in a framed sheet with copy and download, and a Finish setup button that stays dimmed until you tick that you saved them.

  • Pro

    API Key Show Once Success

    Security and access

    A key confirmation inside an app panel: the secret masked with an eye toggle and a real copy button, a checkbox that turns it into its stored form, the key's scopes and dates, a request that uses it, and a Done button that waits for the box.

  • Pro

    A confirmation page for a password reset: the account, the time and the used reset link, three follow-up switches (two-step sign-in, sign out other devices, email about new sign-ins) and one sentence that says what each choice would do after sign-in.