forked from stack-auth/stack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Patched docs/fern/docs/pages/sdk/types/stack-handler.mdx
- 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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
}} | ||
/> | ||
); | ||
} | ||
``` |