Display authenticated-user data
A client-rendered account or dashboard view needs the signed-in user’s Kinde context.
Kinde · Hook
A client-component hook for reading an authorized user’s Kinde authentication data in Next.js. It also provides helpers for organizations, permissions, and refreshing data.
useKindeBrowserClient is a client-side hook for accessing an authorized user’s Kinde authentication data in Next.js. It exposes helpers such as organization access, permission retrieval, and data refresh; the component using it must run on the client.
const { organization, getOrganization, getPermissions, refreshData } = useKindeBrowserClient();An object containing Kinde browser-client data and helper functions, including organization, getOrganization, getPermissions, and refreshData.
"use client";
import { useKindeBrowserClient } from "@kinde-oss/kinde-auth-nextjs";
export default function OrganizationName() {
const { organization, getOrganization } = useKindeBrowserClient();
const currentOrganization = getOrganization();
return <p>{currentOrganization?.name ?? organization?.name ?? "No organization"}</p>;
}A client component obtains organization data from the browser client and renders its name.
A client-rendered account or dashboard view needs the signed-in user’s Kinde context.
A workspace-aware interface needs to identify or render the user’s current organization.
An admin or feature-gating interface needs current permission information.
A client interaction changes authorization-related data and the UI must obtain current values.
It is a browser-side hook from the Kinde Next.js SDK. A client component calls it to access authentication data for an authorized user and helpers such as organization retrieval.
Follow-up: What constraint applies to its use? The component must be a client component, and the utility is supported only in Next.js 14 and above.
The hook returns an object that can include organization data and methods such as getOrganization. Calling getOrganization lets the component obtain the organization associated with the current user.
Follow-up: How would you avoid stale data after a change? Use the exposed refreshData operation and await it before reading the updated values.
refreshData is asynchronous, so callers should await it. This gives the component immediate access to the latest data after refreshing.
Follow-up: Where must this refresh be triggered? From a client component, because Next.js does not permit on-demand refreshing from a server component.
useKindeAuthgetOrganizationgetPermissionsrefreshData