# Source: https://neon.com/llms/neon-auth-components-stack-handler.txt

# <StackHandler />

> The <StackHandler /> documentation outlines the component's role in managing authentication stacks within Neon's architecture, detailing its configuration and integration processes for efficient user authentication handling.

## Source

- [<StackHandler /> HTML](https://neon.com/docs/neon-auth/components/stack-handler): The original HTML version of this documentation

Renders the appropriate authentication or account-related component based on the current route.

For detailed usage instructions, see the manual section of the [setup guide](https://neon.com/docs/neon-auth).

## Props

- `app`: `StackServerApp` — The Neon Auth server application instance.
- `routeProps`: `NextRouteProps` — The Next.js route props, usually the first argument of the page component (see below)
- `fullPage`: `boolean` — Whether to render the component in full-page mode.
- `componentProps`: `{ [K in keyof Components]?: Partial<ComponentProps<Components[K]>> }` — Props to pass to the rendered components.

## Example

```tsx
import { StackHandler } from '@stackframe/stack';
import { stackServerApp } from '@/stack/server';

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