# AtloriaProviderWrapper

**Kind:** Component

**Source:** [`atloria-monorepo/apps/web/src/components/Providers.tsx`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/apps/web/src/components/Providers.tsx#L20)

Inner provider that uses the session. The token is exposed through a REF, not a closure over the session snapshot: on a hard navigation NextAuth resolves the session asynchronously, and a fetch started before that resolution must see the token the moment it arrives. The old closure captured `null` forever, so every full page load of data-fetching pages 401'd after the retry budget (the "No technical snapshot yet" bug on generated projects).

## Props

| Name | Type | Required | Default |
|---|---|---|---|
| `children` | `ReactNode` | ✓ | - |

## Diagram

```mermaid
graph TD
    component_AtloriaProviderWrapper_5a8540c4["AtloriaProviderWrapper"]
    class component_AtloriaProviderWrapper_5a8540c4 rootComponent
```

## Relationships

- RENDERS → `AtloriaProvider`
- USES_HOOK → `useSession`
- USES_HOOK → `useRef`
- USES_HOOK → `useEffect`
- USES_HOOK → `useMemo`

## Referenced By

- `Providers` (RENDERS)
