# Pontive documentation (all pages)
> Every page of https://www.pontive.com/docs as Markdown, in sidebar order. The index with instructions for coding agents is https://www.pontive.com/llms.txt.
# Overview
> What Pontive is, how workspaces, projects and instances fit together, development and production instances, and the hosts and credentials an app uses.
Source: https://www.pontive.com/docs
Pontive is one platform for a product's identity and access: sign-in and sessions, organizations,
roles and fine-grained permissions, the apps, APIs and AI agents that act for your users, and
subscriptions and billing. Your app signs people in through Pontive and reads who they are and what
they may do from Pontive's tokens; your servers verify those tokens; Pontive's APIs configure the rest.
Not signed in.
; return (Signed in as {session.user.email ?? session.user.id}
{session.organization ? (Organization {session.organization.id}, roles {session.organization.roles.join(", ") || "none"}
) : null}Only signed-in users see this.
} />{isAuthenticated ? `Signed in${change?.organizationId ? ` to ${change.organizationId}` : ""}` : "Signed out"}
; } ``` The account menu signs the user out. For calls the components do not make (`signOut()`, `getOrganization()`, `switchOrganization()`), import `Auth` from `@pontive/oidc-client`: it is the singleton the provider configured, as long as your app resolves the same copy `@pontive/pontkit-react` depends on. Never call `Auth.configure()` yourself; pass your own callbacks to the provider's `config` prop. The client's methods are in its README on npm.Not allowed.
; returnInvoices of {org.id}
; } ``` To move the session, link to the switch route ([server sessions](/docs/sdk/server-sessions#organizations-b2b)): ```tsx import { switchOrganizationPath } from "@pontive/pontkit-nextjs/server"; {org.name}; ``` ### In the browser [#in-the-browser] ```ts import { Auth } from "@pontive/oidc-client"; Auth.getOrganization(); // { id, roles, permissions } | null await Auth.switchOrganization("org_..."); ``` In React, `useSession()` from `@pontive/pontkit-react` reports `organization-changed` with the new `organizationId`, so you can reload what depends on it. ### In your API [#in-your-api] `@pontive/pontkit-server`'s resource server gives each verified caller `orgId`, `roles` and `permissions` ([Protect an API](/docs/guides/protect-an-api)); any JWT library reads the same claims. ## Fine-grained checks [#fine-grained-checks] The token is a snapshot of one organization. Ask the authorization API, on your request path, when the question is about a specific object, another organization, or must reflect a change made seconds ago. It speaks [OpenID AuthZEN 1.0](/docs/api-reference/authz/authzen): ```http POST https://authz.{region}.pontive.com/access/v1/evaluation Authorization: Bearer { "subject": { "type": "user", "id": "usr_..." }, "action": { "name": "invoice:approve" }, "resource": { "type": "org", "id": "org_..." } } ``` ```json { "decision": true, "context": { "roles": ["admin"] } } ``` `POST /access/v1/evaluations` checks up to 100 questions at once. With `@pontive/pontkit-server`: ```ts import { createAuthorizationClient } from "@pontive/pontkit-server/authorization"; const authz = createAuthorizationClient({ managementUrl: "https://api.us.pontive.com", // the authz host, https://authz.us.pontive.com, is derived from it issuer: process.env.PONTIVE_ISSUER!, credential: { clientId: "svc_...", clientSecret: process.env.PONTIVE_CLIENT_SECRET! }, // holds sys:authz:check }); const allowed = await authz.check(principal, "invoice:approve", { type: "org", id: "org_..." }); ``` `principal` is the caller your resource server verified. For an agent acting for a user, the client checks by token, so Pontive answers for what both the user and the agent may do. ## Managing organizations, members and roles [#managing-organizations-members-and-roles] - **From your backend or an AI client:** the [management API](/docs/api-reference/management/organizations) (`POST /organizations`, `POST /organizations/{organization}/members` with `user_id` and `roles`, `POST /authz/resource-types/{resource_type}/roles`), or the same operations as tools of the [Pontive MCP server](/docs/guides/pontive-mcp-server). - **By your customers' own admins, inside your app:** the `