integration
OAuth 2 providers
Configurable OAuth 2 credential lifecycle for provider APIs, separate from application login.
Authorize, encrypt, refresh, and revoke third-party credentials without moving provider APIs or product workflows into a generic abstraction.
Run purpose-bound PKCE authorization and keep encrypted provider credentials in user or account scope.
Packages
Use GitHub, LinkedIn, Mastodon, and X drivers or the standards-based OAuth 2 factory.
Packages
Frameworks and integrations
Preserve official AT Protocol discovery, PAR, PKCE, DPoP, nonce, and session-store behavior.
Packages
Frameworks and integrations
integration
Configurable OAuth 2 credential lifecycle for provider APIs, separate from application login.
integration
A packaged LinkedIn connection adapter with application-owned scopes and product operations.
integration
A packaged Mastodon connection adapter with explicit instance and credential ownership.
integration
A packaged X OAuth 2 connection adapter with explicit application permissions.
integration
Connect OAuth credentials, GitHub App installation tokens, and verified webhook delivery through explicit Playstack boundaries.
integration
Use the official AT Protocol OAuth client while keeping discovery, PAR, PKCE, DPoP, nonces, and session storage intact.
framework
Compose Playstack server contracts, React bindings, SSR handoff, and route adapters at the Next.js application edge.
framework
Connect portable Playstack capabilities to dependency injection, guards, decorators, request context, workers, and lifecycle hooks.
@playstack/connections provides purpose-bound OAuth state, PKCE, encrypted credential persistence, refresh serialization, and revocation. The core returns a valid access token while the application calls provider SDKs and owns product actions such as publishing, importing, or repository management.
const connections = createConnections({
persistence,
crypto,
events,
clock,
ids,
providers: [github, mastodon, x],
scope: 'account',
redirectUri: 'https://app.example/api/connections/callback',
returnUrlOrigins: ['https://app.example'],
})GitHub, LinkedIn, Mastodon, and X have named providers. A standards-based OAuth 2 factory covers conventional authorization-code providers while preserving explicit identity lookup and native driver access.
Automatic refresh requires an explicitly nonrotating provider. When refresh is due, rotating or unclassified providers receive a fixed nonretryable refusal before credential decryption or provider submission; existing access outside the lead window remains available. Fresh reviewed authorization or an application's qualified durable integration or explicit native managed Node GitHub.com profile is the supported path. The latter adds permanent credential claims and target barriers, committed one-shot dispatch, encrypted response recovery and guarded installation; unknown outcomes never automatically replay or expire. Adopt its optional schema, narrow grants and required authorization/evidence callbacks before use. Custom providers/transports and live-provider qualification remain separate.
Stored credentials now carry an immutable commitment to their configured OAuth client, server and resource. Signed state and prepared grants carry the same binding, and already-exchanged admission requires the trusted exchange binding. Changed configuration refuses credential use before secrets are decrypted or sent; provider aliases cannot silently retarget a grant. Dedicated client-secret rotation preserves identity. Schema/provider adoption is explicit, without defaults, automatic backfill or rebinding. Generic resource declarations remain trusted application configuration, not endpoint attestation. This guard does not replace physical-target ownership, target-key hasher pinning or a durable refresh journal.
AT Protocol is not flattened into a bearer-token preset. @playstack/atproto wraps the official OAuth client so discovery, PAR, PKCE, DPoP keys and nonces, rotating refresh tokens, and shared session storage keep their native semantics.
Playstack publishes user, account, and account-member Prisma variants. Mature applications can instead implement the portable persistence contract against an existing schema and keep identifier or table mappings application-owned.
Native persistence also retains an opaque ID reservation separately from live Connection rows. Committed IDs cannot be reused after record/owner deletion; known rollback removes provisional reservations, and saves require the witness. Adopt the current schema and custom-adapter contract together. Historical evidence is not fabricated or backfilled. This prevents same-ID resurrection through native ports; it does not add the cross-ID target journal needed for rotating refresh.