Oauth oidc

From qauth-labs/qauth · View interactive version

Oauth oidc is an AI agent skill from the GitHub repository qauth-labs/qauth. OAuth 2.1 / OIDC rules for QAuth. Use when working with authorization endpoints, token flows, PKCE, JWKS, OIDC discovery, or spec compliance (RFC 9700, OIDC Core 1.0). Covers endpoint behaviour, email claim rules, and token security.

How to use this skill

Skill file

OAuth 2.1 / OIDC Rules

You are working in the QAuth OAuth/OIDC implementation.

Spec References

Endpoints

| Endpoint | Description |

| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |

| POST /auth/register | Registration — creates user, credential, attribute, verification token; same 202 for an already registered address |

| POST /auth/login | Password login — looks up user_credentials by (realm_id, 'password', external_sub) where external_sub is the normalised email |

| GET /auth/verify | Email verification — marks credential_data.email_verified=true and user_attributes.verified=true |

| POST /auth/resend-verification | Resend verification email |

| GET /oauth/authorize | Authorization Code Flow initiation |

| POST /oauth/token | Token endpoint (authorization_code, refresh_token grants) |

| POST /oauth/introspect | RFC 7662 introspection (client auth required) |

| GET /oauth/userinfo | OIDC userinfo — reads sub from JWT, returns verified email from user_attributes; the token's aud must contain its client_id or the userinfo URL |

| GET /.well-known/jwks.json | JWKS endpoint |

| GET /.well-known/openid-configuration | OIDC discovery |

Introspection

POST /oauth/introspect is a compliance feature, not a primary usage path.

Modern applications validate JWT tokens locally via JWKS.

Client authentication is required on this endpoint — not optional.

This prevents token enumeration attacks. The endpoint must return {"active":false}

for any unauthenticated request rather than an error, per RFC 7662.

OIDC Discovery

/.well-known/openid-configuration must always reflect the current set of supported

grant types, response types, and signing algorithms.

Wallet federation (T4, Epic #231) is merged and flag-gated behind

WALLET_FEDERATION_ENABLED, which is off by default. Sign-in runs on the dedicated

/ui/wallet-login + /oid4vp/response seam in apps/auth-server, not through

WalletProvider.verify() — that method throws unconditionally by design and must keep

throwing (see AGENTS.md). Two discovery fields are still not advertised, and each is

gated on a distinct condition rather than on wallet federation shipping (checked

2026-08-31):

(apps/auth-server/src/app/helpers/discovery.ts:151). Add "pairwise" only when QAuth

actually derives pairwise subject identifiers; there are no pairwise salts today, so

advertising it would be a false capability claim.

([RFC 9101] signed requests), not SIOPv2. HAIP 1.0 §5.1 mandates signed

authorization requests via JAR with request_uri; SIOPv2 is not the mechanism

(see ADR-004 § Spec status (2026-07-20)).

HAIP 1.0 §7 requires ES256 at minimum, and QAuth supports ES256 — JwsAlgorithm

carries it (libs/core/crypto/src/lib/algorithms.ts:61, #298, closed 2026-07-26) and the

Status List Token verifier requires it (libs/server/federation/src/status/status-list-token.ts:104).

Note ES256 is deliberately absent from SignatureAlgorithm: it exists for the

wallet-federation seam only, and QAuth's own token signing stays EdDSA/hybrid per ADR-005.

Advertise this field when QAuth accepts signed request objects on its own authorization

endpoint — which is a separate capability from verifying a wallet's presentation.

Before advertising either field, confirm the capability against the tree rather than

against this list.

Email Claim Behaviour

The email claim in ID tokens, access tokens and userinfo responses:

ID tokens since #259, access tokens on every grant since 2026-10-19

(ANT-2026-2O0T72HY); without the scope the claims are omitted even for a

verified email. Every site calls resolveEmailClaimsForScopes

(apps/auth-server/src/app/helpers/email-claims.ts); the scope-less

/auth/login token carries none

the schema and auth-engine skills own the claim-resolution trust order.

This is intentional and correct per OIDC Core 1.0. Applications that assume

email is always present in the userinfo response are not OIDC-compliant.

Profile Claim Behaviour

The name claim (OIDC Core §5.1) is released only when the profile scope was

granted, in the ID token (since #755) and at userinfo, and is omitted when the

user has no first or last name stored. Both sites call

resolveProfileClaimsForScopes

(apps/auth-server/src/app/helpers/profile-claims.ts), so they release the same

profile claims for the same grant. Access tokens carry no profile claim.

PKCE

PKCE is mandatory (S256 only; plain rejected) for all authorization code flows.

For the flow, verifier/challenge mechanics, and grant-type rules, see the

auth-oauth skill — this skill covers only OIDC-specific endpoint behaviour.

Token Security (QAuth specifics)

QAuth's token implementation (generic OAuth token-handling rules are in the

auth-oauth skill):

signing (ML-DSA-65 + Ed25519) is implemented and merged, gated behind

HYBRID_SIGNING_ENABLED which is off by default — it is not future work

(libs/core/crypto/src/lib/hybrid-signing.ts, ADR-005; checked 2026-08-31).

Related

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.