This specification is maintained by the AgentRules Working Group. Have enhancements or want to claim maintainership?Submit Specification →
securitycritical PriorityID: webauthn-conditional-ui-signal-revocation-sync

Mandatory WebAuthn Signal API Synchronization for Revoked Passkey Lifecycle State

Enforces synchronous and distributed broadcast of passkey revocation events via the WebAuthn Signal API (PublicKeyCredential.signalUnknownCredential and signalAllAcceptedCredentials). When a credential is deleted or revoked at an identity provider or relying party, client-side autofill caches and peer relying parties must update their credential stores immediately to eliminate autofill presentation and replay of invalid credentials during Conditional UI flows.

Prohibited Anti-Pattern: Silent Server-Side Deletion Without Signal API Notification Causing Conditional UI Ghost Passkey Loops

Export Ready-to-Drop Configuration

Select format below to copy code or download file directly.

---
description: Mandatory WebAuthn Signal API Synchronization for Revoked Passkey Lifecycle State - Enforces synchronous and distributed broadcast of passkey revocation events via the WebAuthn Signal API (PublicKeyCredential.signalUnknownCredential and signalAllAcceptedCredentials). When a credential is deleted or revoked at an identity provider or relying party, client-side autofill caches and peer relying parties must update their credential stores immediately to eliminate autofill presentation and replay of invalid credentials during Conditional UI flows.
globs: src/**/auth/**/*.{ts,tsx}, src/**/passkey/**/*.{ts,tsx}, src/**/webauthn/**/*.{ts,tsx}, src/**/services/credentials/**/*.{ts,tsx}
alwaysApply: true
verified_by: "agentrules.org"
license: "CC-BY-4.0"
source: "https://agentrules.org/rules/webauthn-conditional-ui-signal-revocation-sync"
---

# Mandatory WebAuthn Signal API Synchronization for Revoked Passkey Lifecycle State

> **Severity**: CRITICAL | **Category**: security
> **Anti-Pattern Warning**: Silent Server-Side Deletion Without Signal API Notification Causing Conditional UI Ghost Passkey Loops

## System Constraints
You are a Principal Security Architect enforcing FIDO2 WebAuthn Level 3 specifications and the W3C WebAuthn Signal API standards. You must mandate that any credential revocation, deletion, or administrative invalidation triggers downstream WebAuthn Signal API notifications to clear passkeys from client-side credential manager conditional autofill offerings.

## Strict Guidelines
- Services MUST publish a distributed revocation tombstone whenever a passkey credential ID is deleted, revoked, or reassigned.
- Frontend authentication flows MUST check navigator.credentials feature support for PublicKeyCredential.signalUnknownCredential before initiating Conditional UI mediated requests.
- When a Conditional UI authentication ceremony fails with an unknown, de-registered, or revoked credential ID, the client MUST immediately invoke `PublicKeyCredential.signalUnknownCredential({ rpId, credentialId })` to purge the orphaned passkey from the user agent's autofill cache.
- Engineers MUST NOT silently reject revoked credential authentication assertions without dispatching the Signal API notification to the client authenticator.
- Client applications MUST catch and safely handle SecurityError or NotSupportedError when dispatching Signal API calls in non-supporting browsers, falling back to server-side blacklisting without unhandled promise rejections.
- Re-synchronization jobs MUST invoke `PublicKeyCredential.signalAllAcceptedCredentials({ rpId, allAcceptedCredentialIds })` upon user session restoration if out-of-sync credential state is detected across multiple linked Relying Party IDs.

## Bad vs Good Implementations
### Handling Unknown or Revoked Credential Assertion in Conditional UI

#### Bad Antipattern (AI Common Hallucination)
> **Why it fails**: When an assertion with a revoked or non-existent credential ID arrives, the server simply returns an error. The client does not signal the browser autofill engine, leaving a 'ghost' credential that confuses users on subsequent visits.
```typescript
export async function handleConditionalLogin(assertion: AuthenticationCredential) {
  const response = await fetch('/api/auth/verify', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ id: assertion.id, rawId: assertion.rawId })
  });

  if (!response.ok) {
    // Anti-pattern: Fails silently to the client without signaling the authenticator,
    // causing the revoked passkey to continually appear in Conditional UI autofill.
    throw new Error('Authentication rejected by relying party');
  }
  return response.json();
}
```

#### Production Standard (Correct)
> **Standard**: Detects unknown or revoked credentials explicitly from the verification response and invokes PublicKeyCredential.signalUnknownCredential with the exact credentialId, immediately pruning dead credentials from the platform authenticator's autofill list.
```typescript
interface VerificationResponse {
  success: boolean;
  status: 'AUTHENTICATED' | 'REVOKED_OR_UNKNOWN';
  rpId: string;
}

export async function handleConditionalLogin(assertion: PublicKeyCredential): Promise<void> {
  const response = await fetch('/api/auth/verify', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ id: assertion.id, response: assertion.response })
  });

  const result: VerificationResponse = await response.json();

  if (!response.ok || result.status === 'REVOKED_OR_UNKNOWN') {
    // Invariant: Signal the browser/authenticator to purge the invalid passkey from autofill
    if (typeof PublicKeyCredential !== 'undefined' && 'signalUnknownCredential' in PublicKeyCredential) {
      try {
        await (PublicKeyCredential as unknown as {
          signalUnknownCredential: (params: { rpId: string; credentialId: BufferSource }) => Promise<void>;
        }).signalUnknownCredential({
          rpId: result.rpId || window.location.hostname,
          credentialId: assertion.rawId
        });
      } catch (signalError: unknown) {
        console.warn('Failed to signal unknown credential to passkey manager:', signalError);
      }
    }
    throw new Error('Credential revoked or unrecognized. Autofill cache synchronized.');
  }
}
```

Recommended MCP Servers (mcp-serverlist.com)

Equip agent with system tools to verify code for this stack.

Recommended Agent Skills (askills.dev)

Ready-to-use executable skill functions tailored to this stack.

Architectural Specification & Invariant Rationale

Architectural Invariant Design: Mandatory WebAuthn Signal API Synchronization for Revoked Passkey Lifecycle State

Mandatory WebAuthn Signal API Synchronization for Revoked Passkey Lifecycle State defines an industrial-grade behavioral standard for security engineering. Enforces synchronous and distributed broadcast of passkey revocation events via the WebAuthn Signal API (PublicKeyCredential.signalUnknownCredential and signalAllAcceptedCredentials). When a credential is deleted or revoked at an identity provider or relying party, client-side autofill caches and peer relying parties must update their credential stores immediately to eliminate autofill presentation and replay of invalid credentials during Conditional UI flows. Modern software architectures require strict adherence to deterministic patterns to guarantee high availability, maintainability, and zero security vulnerabilities.

Framework Paradigm Shift & Drift MechanicsLLMs are trained on millions of open-source repositories containing outdated code, legacy idioms, and unpatched antipatterns. When coding assistants generate implementations for this stack, they default to common statistical tokens: Silent Server-Side Deletion Without Signal API Notification Causing Conditional UI Ghost Passkey Loops Without an explicit system instruction file, developers spend hours debugging silent failures.
Failure Modes & Production Blast Radius

Hazard Analysis: What Breaks Without This Rule

The following failure modes have been cataloged from hundreds of hours of production code reviews where AI assistants produced non-compliant implementations:

Failure ModeAI Symptom (The Anti-Pattern)SeverityProduction Impact & Remedy
AI Hallucination & Deprecation DriftSilent Server-Side Deletion Without Signal API Notification Causing Conditional UI Ghost Passkey LoopsCritical
Violating this industrial standard introduces regression bugs, security risks, and unexpected runtime failures in production.
Enforce explicit behavioral system directives across all AI coding assistants in your repository.
Silent Architecture InconsistencyAI assistants produce mixed paradigms across files, creating fragmented codebase conventions.Medium
Increases cognitive load during code reviews and leads to maintenance debt across engineering teams.
Pin project conventions in .cursor/rules, CLAUDE.md, and AGENTS.md so all team agents follow identical guardrails.
Architectural Directives in Detail

Step-by-Step Production Directives

Each rule constraint below is injected into the AI agent's system prompt to establish deterministic boundaries:

1

Services MUST publish a distributed revocation tombstone whenever a passkey credential ID is deleted, revoked, or reassigned.

Services MUST publish a distributed revocation tombstone whenever a passkey credential ID is deleted, revoked, or reassigned.

Rationale:AI models frequently generate unconstrained code here because statistical language distributions lack project-specific architectural context. Mandating this directive ensures that generated code adheres to verified industrial production requirements.
Enforcement:Integrated into the Agent Pack rule file. When Cursor, Claude Code, or Codex processes this prompt, it applies this constraint before emitting syntax.
2

Frontend authentication flows MUST check navigator.credentials feature support for PublicKeyCredential.signalUnknownCredential before initiating Conditional UI mediated requests.

Frontend authentication flows MUST check navigator.credentials feature support for PublicKeyCredential.signalUnknownCredential before initiating Conditional UI mediated requests.

Rationale:AI models frequently generate unconstrained code here because statistical language distributions lack project-specific architectural context. Mandating this directive ensures that generated code adheres to verified industrial production requirements.
Enforcement:Integrated into the Agent Pack rule file. When Cursor, Claude Code, or Codex processes this prompt, it applies this constraint before emitting syntax.
3

When a Conditional UI authentication ceremony fails with an unknown, de-registered, or revoked credential ID, the client MUST immediately invoke `PublicKeyCredential.signalUnknownCredential({ rpId, credentialId })` to purge the orphaned passkey from the user agent's autofill cache.

When a Conditional UI authentication ceremony fails with an unknown, de-registered, or revoked credential ID, the client MUST immediately invoke `PublicKeyCredential.signalUnknownCredential({ rpId, credentialId })` to purge the orphaned passkey from the user agent's autofill cache.

Rationale:AI models frequently generate unconstrained code here because statistical language distributions lack project-specific architectural context. Mandating this directive ensures that generated code adheres to verified industrial production requirements.
Enforcement:Integrated into the Agent Pack rule file. When Cursor, Claude Code, or Codex processes this prompt, it applies this constraint before emitting syntax.
4

Engineers MUST NOT silently reject revoked credential authentication assertions without dispatching the Signal API notification to the client authenticator.

Engineers MUST NOT silently reject revoked credential authentication assertions without dispatching the Signal API notification to the client authenticator.

Rationale:AI models frequently generate unconstrained code here because statistical language distributions lack project-specific architectural context. Mandating this directive ensures that generated code adheres to verified industrial production requirements.
Enforcement:Integrated into the Agent Pack rule file. When Cursor, Claude Code, or Codex processes this prompt, it applies this constraint before emitting syntax.
5

Client applications MUST catch and safely handle SecurityError or NotSupportedError when dispatching Signal API calls in non-supporting browsers, falling back to server-side blacklisting without unhandled promise rejections.

Client applications MUST catch and safely handle SecurityError or NotSupportedError when dispatching Signal API calls in non-supporting browsers, falling back to server-side blacklisting without unhandled promise rejections.

Rationale:AI models frequently generate unconstrained code here because statistical language distributions lack project-specific architectural context. Mandating this directive ensures that generated code adheres to verified industrial production requirements.
Enforcement:Integrated into the Agent Pack rule file. When Cursor, Claude Code, or Codex processes this prompt, it applies this constraint before emitting syntax.
6

Re-synchronization jobs MUST invoke `PublicKeyCredential.signalAllAcceptedCredentials({ rpId, allAcceptedCredentialIds })` upon user session restoration if out-of-sync credential state is detected across multiple linked Relying Party IDs.

Re-synchronization jobs MUST invoke `PublicKeyCredential.signalAllAcceptedCredentials({ rpId, allAcceptedCredentialIds })` upon user session restoration if out-of-sync credential state is detected across multiple linked Relying Party IDs.

Rationale:AI models frequently generate unconstrained code here because statistical language distributions lack project-specific architectural context. Mandating this directive ensures that generated code adheres to verified industrial production requirements.
Enforcement:Integrated into the Agent Pack rule file. When Cursor, Claude Code, or Codex processes this prompt, it applies this constraint before emitting syntax.
Technical Questions & Answers

Frequently Asked Technical Questions

Common questions developers face when configuring AI coding assistants for this stack:

Q:Why is Mandatory WebAuthn Signal API Synchronization for Revoked Passkey Lifecycle State critical for AI coding assistants?

Enforces synchronous and distributed broadcast of passkey revocation events via the WebAuthn Signal API (PublicKeyCredential.signalUnknownCredential and signalAllAcceptedCredentials). When a credential is deleted or revoked at an identity provider or relying party, client-side autofill caches and peer relying parties must update their credential stores immediately to eliminate autofill presentation and replay of invalid credentials during Conditional UI flows. Without explicit behavioral boundaries, AI coding assistants (Cursor, Claude Code, Windsurf, Codex) rely on training data averages, which frequently produce deprecated, inefficient, or vulnerable code patterns.

Q:How does adopting this rule prevent AI hallucinations?

This rule explicitly declares what the AI must avoid (Silent Server-Side Deletion Without Signal API Notification Causing Conditional UI Ghost Passkey Loops) and prescribes verified positive examples. Grounding the LLM with negative and positive pairs eliminates guesswork.

Q:Which AI coding environments are supported?

This specification is multi-platform compatible: Cursor (.cursor/rules/*.mdc & .cursorrules), Anthropic Claude Code (CLAUDE.md), Windsurf (.windsurfrules), Codex / Cline (AGENTS.md), and GitHub Copilot (.github/copilot-instructions.md).

Q:Can I combine this rule with other technology stacks?

Yes. Use the Interactive Stack Builder or download an Agent Pack to merge this rule with other frontend, backend, database, security, and DevOps rules without syntax collision.

Open Specification · CC BY 4.0·Free for Personal, Team & Commercial In-Repo Use

Citation & Open Source Attribution Guidelines

This specification is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0). You are completely free to adapt and share this rule in your workspace. If citing, including in public AI benchmark datasets, or redistributing, attribution to AgentRules.org is required.

1 Rule in Stack

Mandatory