Area guide · 6 packages · Trace authenticated subject construction
Identity, access and subject context
Carry trusted actor and tenant context through product requests, agent actions and shared runtime projections.
What are you trying to do?
- Which layer authenticates a person and which projects authority?
- How does subject context reach server-rendered UI?
- How do provisioning and delegation remain scoped?
Why start with these packages
Suggested entry point
@lssm-tech/lib.authos-specStart with the identity, authentication, federation and account-surface contracts.
Suggested entry point
@lssm-tech/lib.authos-runtimeUse subject providers, SSR scope and deterministic security/provisioning projections.
Suggested entry point
@lssm-tech/integration.authos-better-authInspect the concrete Better Auth integration used by the selected host.
Suggested entry point
@lssm-tech/lib.identity-rbacLocate reusable role and permission composition already used by domain modules.
Practical steps
Step 01
Trace one authenticated request
Identify the identity provider, session verifier, subject factory, tenant/workspace selection and operation context. Keep user-supplied identifiers separate from the values the host has verified.
Step 02
Inspect the missing-authority case
Follow an absent session, malformed subject, revoked membership or mismatched workspace through the same path. Check that both the UI projection and the execution boundary express the expected unavailable or denied state.
Step 03
Review a provisioning retry
Use the existing receipt/reducer flow to see whether a repeated step resumes safely and whether partial activation stays visible. Bind the selected product membership and entitlement to the exact subject instead of treating organization membership as universal product access.
Separate authentication from projection
AuthOS spec declares identity and security-gated account behavior. AuthOS runtime converts those contracts into projections for RBAC, RoleMorph, personalization, redaction and other consumers. The README explicitly places authentication, database access and provider execution outside those pure projections. A concrete integration such as authos-better-auth and the product host perform that work. When adopting this area, trace where a verified session becomes a trusted subject before using an access projection in an API or interface.
Keep context request-scoped
The SSR entry binds the shared server-only subject scope with runWithSubject, cached reads and nested/concurrent request isolation. Subject construction stays with AuthOS; the lower propagation port does not decide policy. Subject providers can use a resolver and optional tenant-scoped cache, and malformed or failed resolution returns a denied/missing result. This separation helps prevent a convenient UI context from becoming an accidental cross-request authority source. Inspect cache keys and request lifetime alongside the subject shape.
Model provisioning as receipts and state
The provisioning reducer consumes redacted, idempotent receipts covering identity, entitlements, product-local membership, activation and revocation. It avoids activating a partially provisioned product and detects scope/idempotency conflicts. Rebuild and retry behavior therefore belongs to a recorded lifecycle rather than an unchecked sequence of provider calls. The domain-command helper can produce governance-bearing local events while retaining canExecute false plans. Host execution must still resolve the required provider, database and approval boundaries.
Follow a practical path.
Trace one authenticated request
Identify the identity provider, session verifier, subject factory, tenant/workspace selection and operation context. Keep user-supplied identifiers separate from the values the host has verified.
Inspect the missing-authority case
Follow an absent session, malformed subject, revoked membership or mismatched workspace through the same path. Check that both the UI projection and the execution boundary express the expected unavailable or denied state.
Review a provisioning retry
Use the existing receipt/reducer flow to see whether a repeated step resumes safely and whether partial activation stays visible. Bind the selected product membership and entitlement to the exact subject instead of treating organization membership as universal product access.
Packages in this area (6)
6 of 6 shown
- Open manual →
Better Auth bridge that maps AuthOS contracts to provider configuration, plugins, and redacted events.
Inspect the concrete Better Auth integration used by the selected host.
- Open manual →
Pure deterministic AuthOS runtime projections and security gates over AuthOS contracts.
Use subject providers, SSR scope and deterministic security/provisioning projections.
- Open manual →
Contract-first AuthOS specifications for identity, authentication, federation, and security-gated account surfaces.
Start with the identity, authentication, federation and account-surface contracts.
- Open manual →
Zero-dependency browser and React Native compatible crypto helpers
- Open manual →
Identity, Organizations, and RBAC module for ContractSpec applications
Locate reusable role and permission composition already used by domain modules.
- Open manual →
Reusable AuthOS module with fake adapters and UI flows for identity, authentication, organizations, and Connect with LSSM.
What connects to this area
Core contracts
An operation must describe the authority context its host needs.
Governance and approvals
Identity is one input to a policy or approval decision.
Ui and presentations
Role-aware presentation consumes resolved subject and policy state.
Personal and learning
Personal data and delegated household actions need subject-specific scope.