<SignedIn>
Overview
The <SignedIn>
component offers authentication checks as a cross-cutting concern. Any children components wrapped by a <SignedIn>
component will be rendered only if there's a User with an active Session signed in your application.
- Name
treatPendingAsSignedOut?
- Description
import { SignedIn, ClerkProvider } from '@clerk/clerk-react'
// Import your Publishable Key
const PUBLISHABLE_KEY = import.meta.env.VITE_CLERK_PUBLISHABLE_KEY
if (!PUBLISHABLE_KEY) {
throw new Error('Add your Clerk Publishable Key to the .env file')
}
function Page() {
return (
<ClerkProvider publishableKey={PUBLISHABLE_KEY}>
<SignedIn>
<div>This content is visible only to signed in users.</div>
</SignedIn>
<p>This content is always visible.</p>
</ClerkProvider>
)
}
Feedback
Last updated on