# XCC IAM (OneXCC Identity Provider) > Centralized OpenID Connect (OIDC Core 1.0) & OAuth 2.1 Identity Provider (PKCE S256, RFC 8707 Resource Indicators, Dual-Track Personal/Enterprise accounts, Multi-Session, and B2B Organizations) for the OneXCC ecosystem. ## Documentation Entrypoints - User, Org & Admin Console Guides (VI): `/vi/docs` - User, Org & Admin Console Guides (EN): `/en/docs` - SSO / OIDC / OAuth 2.1 / MCP Technical Docs (VI): `/vi/docs/sso` - SSO / OIDC / OAuth 2.1 / MCP Technical Docs (EN): `/en/docs/sso` ## G1: Authentication, Dual-Track, Security & Multi-Session - Sign-in & Sign-up: `/sign-in`, `/sign-up` - Dual-Track query parameters (`track`, `mode`, `type`, `tab`, `persona`, `account_type`, `accountType`, `user_type`, `userType`) accept `personal` or `enterprise`. Supplying an explicit track locks the UI to that track and hides the switcher tabs. - UI password policy on Sign-Up, Reset Password, and Security forms: **12–128 characters** (Argon2id hashing), protected by Cloudflare Turnstile and rate limiting. - Optional Social OAuth providers: Google and GitHub (when configured in server environment). - Password Recovery: `/forget-password`, `/reset-password` - Completing a password reset automatically revokes all active user sessions. - OAuth 2.1 Consent Screen: `/consent` - Displays the requesting client application and requested scopes (`openid`, `profile`, `email`, `offline_access`, `mcp:access`) for explicit Approve or Deny. - Multi-Session Switcher: - Supports up to **5 concurrent sessions** in the same browser via the sidebar switcher in `/dashboard` and `/admin` (1-click switch, Add Account, Sign Out This Account, Sign Out All Accounts). - Each session inside a satellite app still acts as 1 account / 1 active organization context at a time. - Account Center: - `/dashboard` (Overview) - `/dashboard/profile` (Display name, avatar PNG/JPG/WebP <= 2 MB, email verification resend, Google/GitHub account linking) - `/dashboard/security` (Change password 12–128 chars with optional revoke other sessions, TOTP 2FA QR setup/disable) - `/dashboard/sessions` (Inspect device/IP sessions, revoke one or all other sessions) - `/dashboard/apps` (Inspect authorized OAuth/MCP apps & scopes, revoke access via `POST /api/apps/[clientId]/revoke`) ## G2: B2B Organizations, Invitations & Roles - Organization Directory & Switching: `/dashboard/organizations` (includes Set Active organization per session) - Create Organization: `/dashboard/organizations/new` - Slug must be 3–50 lowercase characters matching `^[a-z0-9]+(?:-[a-z0-9]+)*$` (Vietnamese diacritics are normalized automatically; creator becomes `owner`). - Settings & Danger Zone: `/dashboard/organizations/[slug]` - `owner` and organization `admin` can update organization details. - Danger Zone currently supports **Delete Organization only** (`owner` only). - Members & Invitations: `/dashboard/organizations/[slug]/members` and `/accept-invitation/[id]` - Invitations expire after **7 days** and can assign `member` or `admin`. - `owner` or organization `admin` can send, resend, or cancel pending invitations and remove non-owner members; only `owner` can change member roles. - Accepting at `/accept-invitation/[id]` requires signing in with the exact invited email address. - Verified Current Organization Roles: `owner`, `admin`, `member`. - Note: Organization-level `admin` is distinct from System IAM Administrator (`user.role === "admin"`, who accesses `/admin/*`). - Verified Codebase vs PRD Discrepancy: Current branch code retains the organization `admin` role and does not implement ownership transfer UI or a single-owner lock. ## G3: System IAM Admin Console (`/admin/*`) - Access Guard: Requires authenticated session with `user.role === "admin"` (non-admin accounts receive `403 Access Denied`; system admin promotion is performed operationally in the DB). - `/admin/users`: User directory, System Admin role toggle, session revocation, ban/unban (banning immediately revokes active sessions and authorization tokens). - `/admin/organizations`: System-wide B2B workspace monitoring and emergency `suspend` / `reactivate`. - `/admin/projects`: Provision and govern OAuth 2.1 Clients (Confidential or Public Native with PKCE S256). Dynamic Client Registration (DCR) is disabled; all OAuth clients must be pre-seeded or created manually here. - `/admin/resources`: Manage RFC 8707 Resource Indicators and client-resource bindings (`enforcePerClientResources: true`). - `/admin/audit-logs`: Immutable security & compliance audit logs (`oauth_consent.grant`, auth, admin actions) with grant revocation. ## OIDC / OAuth 2.1 / MCP Endpoints & Current Scope Boundaries - Discovery & Metadata: - `/.well-known/openid-configuration` (OIDC Discovery; canonical public endpoint) - `/.well-known/oauth-authorization-server` (RFC 8414 Authorization Server Metadata) - `/.well-known/oauth-protected-resource/api/mcp` (RFC 9728 MCP Protected Resource Metadata) - `/jwks` (JSON Web Key Set) - Underlying Better Auth Issuer URI: `https://iam.xcc.one/api/auth` (or `BETTER_AUTH_URL + /api/auth`) - Core OAuth 2.1 Endpoints: - `/oauth2/authorize` (PKCE S256 required) - `/oauth2/token` - `/oauth2/userinfo` (alias `/userinfo`) - `/oauth2/revoke` (RFC 7009) - `/oauth2/introspect` (RFC 7662) - `/oauth2/end-session` (OIDC RP-Initiated Logout) - `/oauth2/register` (Disabled — returns HTTP `403 access_denied`; `registration_endpoint` is omitted from discovery metadata) - Dynamic Client Registration (RFC 7591) Policy: - DCR is disabled in code (`src/modules/auth/dcr-config.ts`, `allowDynamicClientRegistration: false` in `src/modules/auth/auth.ts`, and `403 access_denied` on `POST /oauth2/register` and `POST /api/auth/oauth2/register`). - `registration_endpoint` is stripped from `/.well-known/openid-configuration` and `/.well-known/oauth-authorization-server`. - All OAuth 2.1 / MCP clients must be pre-seeded or created manually by an administrator at `/admin/projects` with PKCE `S256`. - Current Codebase Scope Boundaries: - No separate `agent` account subject type exists yet; AI agents authenticate via human-delegated OAuth 2.1 + PKCE S256 + RFC 8707 `resource` tokens. - No RFC 8693 Token Exchange `act` claim, no `mb:*` granular scopes, no ownership transfer UI, and no single-owner lock are implemented in the current branch.