Skip to content

Commit

Permalink
Patched docs/fern/docs/pages/sdk/types/stack-handler.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
patched.codes[bot] committed Dec 10, 2024
1 parent a095bc2 commit 9a2e47d
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions docs/fern/docs/pages/sdk/types/stack-handler.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: StackHandler
---

# StackHandler

A component that handles routing for various authentication and account-related pages in a Stack application.

## Props

- `app`: `StackServerApp<HasTokenStore>` - The Stack server application instance.
- `fullPage`: `boolean` - Whether to render the component in full-page mode.
- `componentProps`: `object` (optional) - Props to pass to individual components rendered by StackHandler.
- Can include props for: `SignIn`, `SignUp`, `EmailVerification`, `PasswordReset`, `ForgotPassword`, `SignOut`, `OAuthCallback`, `MagicLinkCallback`, `TeamInvitation`, `ErrorPage`, `AccountSettings`.
- `routeProps`: `RouteProps | unknown` - Route properties including `params` and `searchParams`.

## Example

```tsx
import { StackHandler } from '@stackframe/stack';
import { app } from './your-stack-app-config';

export default function Page({ params, searchParams }) {
return (
<StackHandler
app={app}
fullPage={true}
routeProps={{ params, searchParams }}
componentProps={{
SignIn: { /* custom props for SignIn component */ },
// ... other component props
}}
/>
);
}
```

0 comments on commit 9a2e47d

Please sign in to comment.