Skip to main content

SignedOut

The SignedOut composable conditionally renders its content only when the user is not authenticated. It is the counterpart to SignedIn.

SignedOut requires ThunderIDProvider in its ancestor composable hierarchy.

Usage

import dev.thunderid.compose.components.guards.SignedOut

@Composable
fun ContentView() {
SignedOut {
Text("Please sign in to continue.")
}
}

Parameters

ParameterTypeRequiredDescription
fallback(@Composable () -> Unit)?The composable to render when the user is authenticated. Defaults to nothing.
content@Composable () -> UnitThe composable to render when the user is not authenticated.

Example: Show a Banner for Guests

SignedOut {
Banner("Sign in to unlock all features")
}

Example: Route Between Screens

Use SignedOut alongside SignedIn to implement bidirectional routing:

SignedIn(fallback = {
SignedOut { AuthView() }
}) {
HomeView()
}

Explore with AI

ThunderID LogoThunderID Logo

Product

DocsAPIsSDKs
© Copyright Linux Foundation Europe.For web site terms of use, trademark policy and other project policies please see https://linuxfoundation.eu/en/policies.