Skip to main content

<SignedOut />

You're reading Identity & Access Management 7.1.0. The newest release is 7.3.0, and Cloud has the newest features. Go to the newest release

The SignedOut component conditionally renders its children only when the user is signed out using WSO2 Identity Platform authentication. It provides a simple way to show UI sections for unauthenticated users and display fallback content when the user is signed in.

Overview​

The SignedOut component checks the authentication state and renders its children if the user is signed out. If the user is signed in, it renders the provided fallback content or nothing by default. This is useful for showing sign-in prompts or public content.

Usage​

You can use the SignedOut component to wrap any content that should only be visible to unauthenticated users.

Basic Usage​

Use SignedOut to show content only when signed out.

SignedOut Example
import { SignedOut } from '@asgardeo/react'

<SignedOut>
<p>Please sign in to continue</p>
</SignedOut>
Note

If the user is signed in, nothing will be rendered unless you provide a fallback prop.

With Fallback​

Show alternative content when the user is signed in:

With Fallback
<SignedOut fallback={<p>You are already signed in</p>}>
<p>Please sign in to continue</p>
</SignedOut>

Props​

PropTypeRequiredDescription
childrenReactNode✅Content to render when the user is signed out
fallbackReactNode❌Content to render when the user is signed in

Notes​

  • Useful for showing sign-in prompts, public pages, or UI elements for unauthenticated users.

Was this page helpful?