# isitquantumready.com auth.md

You are an agent. This page says how to get credentials for isitquantumready.com, and when you need none.

## Do you need to register?

**Scanning needs no registration.** The MCP server's `scan_site`, `survey_domain` and `check_third_parties` tools, `GET /api/scan?domain=`, `/api/estate`, `/api/partners` and `/.well-known/search?q=` are public. Send no `Authorization` header.

**Acting on a person's Watch account needs their approval.** The MCP tools `list_watched_sites` (scope `watch:read`), `watch_site` and `stop_watching_site` (scope `watch:write`) work only with an access token that the person approved while signed in on the site. Ask the person before you start, and say which scopes you want.

## Step 1: Discover

- Protected resource: https://isitquantumready.com/mcp. Metadata: https://isitquantumready.com/.well-known/oauth-protected-resource (RFC 9728). Calling an account tool without a token returns HTTP 401 with `WWW-Authenticate: Bearer resource_metadata="…"`.
- Authorization server: issuer https://isitquantumready.com, metadata at https://isitquantumready.com/.well-known/oauth-authorization-server (RFC 8414), with an `agent_auth` block for agent registration.

There are two ways to register. MCP clients that implement OAuth use Step 2a. Other agents that know the person's email address use Step 2b.

## Step 2a: OAuth 2.1 (MCP clients)

1. Register a public client: `POST https://isitquantumready.com/oauth/register` with JSON `{"client_name": "…", "redirect_uris": ["https://…/callback"], "token_endpoint_auth_method": "none"}` (RFC 7591). Redirect URIs must be https, http on a loopback address, or a private-use scheme.
2. Send the person to https://isitquantumready.com/oauth/authorize?response_type=code&client_id=…&redirect_uri=…&scope=watch:read%20watch:write&state=…&code_challenge=…&code_challenge_method=S256&resource=https://isitquantumready.com/mcp. PKCE with S256 is required.
3. They sign in (we email them a link; there is no password), see your client's name and the scopes, and allow or deny. You get `code`, `state` and `iss` on your redirect URI.
4. `POST https://isitquantumready.com/oauth/token` (form-encoded) with `grant_type=authorization_code`, `code`, `redirect_uri`, `client_id` and `code_verifier`. You get an `access_token` (valid one hour) and a `refresh_token` (30 days, rotated on every use: `grant_type=refresh_token`).

## Step 2b: Agent registration with the person's email (service_auth)

1. Register:

   ```http
   POST https://isitquantumready.com/agent/identity
   Content-Type: application/json

   {"type": "service_auth", "login_hint": "person@example.com", "client_name": "Your agent's name", "scope": "watch:read watch:write"}
   ```

   The answer has a `claim_token` (keep it in memory; it is returned once and expires in 24 hours) and a `claim` block with a 6-digit `user_code`, a `verification_uri`, `expires_in` (600 seconds) and `interval` (5 seconds). Nothing is emailed at this step.

2. Show the person both, in one message: "Open this link, sign in as person@example.com, and enter this code: 123456". Only the person signed in as the address you registered can approve, and only with the code. They can also deny.

3. Poll the token endpoint no faster than `interval`:

   ```http
   POST https://isitquantumready.com/oauth/token
   Content-Type: application/x-www-form-urlencoded

   grant_type=urn:workos:agent-auth:grant-type:claim&claim_token=clm_…
   ```

   While waiting you get `authorization_pending` (or `slow_down` if you poll too fast). When the person approves you get an `access_token` (one hour) and an `identity_assertion` (a JWT signed by this service, valid 30 days, verifiable with https://isitquantumready.com/.well-known/jwks.json). The claim token then stops working.

4. If the code expires first (`expired_token`), get a new one with `POST https://isitquantumready.com/agent/identity/claim` and `{"claim_token": "clm_…", "email": "person@example.com"}`, and show the new code. If the registration itself has expired (`claim_expired`), start again at step 1.

5. When the access token expires, exchange the identity assertion for a new one: `grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer&assertion=…` at the token endpoint.

Not supported: `anonymous` registration (scanning already needs none), and ID-JAG identity assertions from agent providers.

## Step 3: Call the MCP server

Send `Authorization: Bearer <access_token>` with your requests to https://isitquantumready.com/mcp. A missing scope gets HTTP 403 with `error="insufficient_scope"`. An unknown, expired or withdrawn token gets HTTP 401 with `error="invalid_token"`: refresh it, or register again.

## Revocation

- You: `POST https://isitquantumready.com/oauth/revoke` with `token=…` (RFC 7009). Revoking an access or refresh token ends that token; revoking the identity assertion ends the whole approval and every token under it.
- The person: the account page at https://isitquantumready.com/watch.html lists every agent with access and removes any of them at once.

## Errors

| Code | Where | What to do |
| --- | --- | --- |
| `anonymous_not_enabled` | `/agent/identity` | Use the public tools without registering, or register with `service_auth`. |
| `issuer_not_enabled` | `/agent/identity` | Use `service_auth` with the person's email. |
| `invalid_request` | `/agent/identity` | Fix the body: `login_hint` must be an email address. |
| `invalid_claim_token` | `/agent/identity/claim` | Register again. |
| `claim_expired` | `/agent/identity/claim` | Register again. |
| `authorization_pending` | `/oauth/token` | Keep polling at `interval`. |
| `slow_down` | `/oauth/token` | Poll less often. |
| `expired_token` | `/oauth/token` | Get a new code at `/agent/identity/claim`. |
| `invalid_grant` | `/oauth/token` | The code, token or assertion is used, expired or withdrawn. Start again. |

## How our scanner identifies itself

When the scanner requests another site's home page, the request is signed with Web Bot Auth (HTTP Message Signatures, tag `web-bot-auth`) and names `Signature-Agent: "https://isitquantumready.com"`. The public key is at https://isitquantumready.com/.well-known/http-message-signatures-directory.

## Contact

https://isitquantumready.com/contact.html
