Your agent can build the integration.See the two prompts

A profile-only security boundary.

AnyOAuth verifies Google/GitHub identity without exposing provider tokens or provider API access. This page describes the implementation, not a security certification.

Simple integration, server-side authentication

Mount the managed SDK router, then use browser startLogin('google'), getProfile() and logout(). The backend creates the private login cookie, validates the bare callback, retrieves the result once and establishes the authenticated session. Quickstart · Framework examples.

Provider credentials stay server-side

Google identity tokens are validated for signature, issuer, audience, lifetime and nonce. GitHub profile/email data is retrieved server-side using the freshly exchanged token. Provider tokens are not persisted or returned to customer applications.

Protected callbacks and sessions

Provider callbacks use browser-bound state and PKCE. Application callbacks exactly match a registered URL and contain no code/state parameters in the recommended flow. Creating and retrieving a login result require backend client credentials; login attempts expire after ten minutes and terminal results are one-time.

The managed SDK's default application cookies are encrypted, HttpOnly, SameSite=Lax and Secure on HTTPS. Keys are separated by purpose and bound to the project, origin and auth path. Default expiry is one day. Logout clears this browser's cookie; immediate server-side revocation uses a custom session adapter.

What your application owns

Your application owns its user records and permission checks. Identify users by profile.subject, not email. A profile shown by a frontend is not a backend credential: protected routes validate the SDK session or your own store. Keep project secrets on the backend. Browser-only OAuth is deferred.

Existing code and profile-token integrations

The authorization-code API remains compatible. Its two-minute single-use codes are exchanged on the backend using the original verifier and client secret. Opaque profile-only tokens expire after fifteen minutes, are stored as hashes and can be revoked. They do not grant provider API access or terminate your application's own session when revoked.

Identity isolation and stored data

Identities are scoped by project, provider and provider subject. Matching emails do not merge accounts. D1 stores project settings, normalized profiles, owner accounts, hashed credentials and short-lived login records. Scheduled cleanup removes expired records; profiles remain until deleted through the management interface. Project management checks ownership and validates the Origin on state-changing requests.