Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/pages/sdk/auth-client/functions/OcSessionProvider.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const metadata = {
function OcSessionProvider(__namedParameters: OcSessionProviderProps): ReactElement;
```

Defined in: [provider.tsx:148](https://github.com/orangecheck/oc-packages/blob/main/auth-client/src/provider.tsx#L148)
Defined in: [provider.tsx:180](https://github.com/orangecheck/oc-packages/blob/main/auth-client/src/provider.tsx#L180)

Top-level provider that exposes the cross-subdomain oc_session to every
component below it. Mount once, near the root of your tree.
Expand Down
2 changes: 1 addition & 1 deletion src/pages/sdk/auth-client/functions/useOcSession.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const metadata = {
function useOcSession(): OcSessionState;
```

Defined in: [provider.tsx:339](https://github.com/orangecheck/oc-packages/blob/main/auth-client/src/provider.tsx#L339)
Defined in: [provider.tsx:388](https://github.com/orangecheck/oc-packages/blob/main/auth-client/src/provider.tsx#L388)

Access the current cross-subdomain oc_session. Must be called inside
an `<OcSessionProvider>`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const metadata = {
function useOptionalOcSession(): OcSessionState | null;
```

Defined in: [provider.tsx:354](https://github.com/orangecheck/oc-packages/blob/main/auth-client/src/provider.tsx#L354)
Defined in: [provider.tsx:403](https://github.com/orangecheck/oc-packages/blob/main/auth-client/src/provider.tsx#L403)

Non-throwing variant — returns `null` if called outside a provider.
Useful for libraries that want to read the session *if it exists* but
Expand Down