Skip to main content

Identity Linking

3.1 Capability Identifier

The identity linking namespace is dev.ucp.common.identity_linking. It is a cross-domain common capability (common rather than shopping) because identity linking is not limited to shopping scenarios.

3.2 Why Identity Linking Is Needed

Consumers may already have accounts with merchants (membership tiers, loyalty points, saved addresses, order history, payment methods). Identity linking allows AI agents to securely represent consumers and leverage this existing information to deliver a personalized shopping experience — without requiring consumers to re-enter any information or share passwords. Checkout without identity linking: The AI agent can only create a guest checkout. The consumer must manually provide all information. Checkout with identity linking: The AI agent can directly access the consumer’s saved addresses, payment methods, and membership benefits, completing the checkout in a single step.

3.3 Authorization Server Discovery

UCP requires merchants to publish authorization server metadata at the standard /.well-known/oauth-authorization-server endpoint (per RFC 8414):
An AI agent can issue a GET request to this endpoint to automatically discover the merchant’s OAuth configuration, with no need to hard-code any authorization URLs.

3.4 OAuth 2.0 Authorization Code Flow

UCP uses the standard OAuth 2.0 Authorization Code flow and mandates PKCE (Proof Key for Code Exchange) for enhanced security:

Step 1: Generate PKCE Parameters

Step 2: Initiate Authorization Request

Key parameter descriptions:

Step 3: User Authorization

The merchant presents an authorization page that clearly informs the user:
  • Which AI agent is requesting authorization
  • What permissions are being requested
  • The user can revoke access at any time
After the user confirms, the merchant redirects the browser to the redirect_uri with an authorization code:

Step 4: Token Exchange

Step 5: Receive Tokens

3.5 UCP Scope Specification

UCP defines standardized scope naming with the ucp:scopes: prefix: Merchants may extend with custom scopes beyond UCP’s standard scopes. However, AI agents should always follow the principle of least privilege — only requesting the scopes they actually need.

3.6 Token Revocation (RFC 7009)

UCP requires merchants to implement a token revocation endpoint in compliance with the RFC 7009 OAuth 2.0 Token Revocation standard:
Revocation scenarios include:
  • User-initiated revocation: The user revokes AI agent authorization in the merchant’s account settings
  • Agent-initiated revocation: The AI agent proactively revokes the token when access is no longer needed
  • Security incident: Emergency revocation of all tokens upon detecting anomalous activity
When revoking an access_token, the associated refresh_token should also be invalidated.

3.7 Token Refresh

After an access_token expires, use the refresh_token to obtain a new access_token:
The response includes a new access_token and potentially a new refresh_token (token rotation).

3.8 Security Requirements


Next chapter: Order Management — Line item status, fulfillment events, adjustments, and webhook signatures