This topic was mentioned in IwamotoTakashi’s diary (here, here, here, and here) and in ZIGOROu’s diary, so I will briefly organize the points.
The question is: “Which identity of an end user should an RP recognize as a unique user?”
OpenID 1.1
[Request]
openid.identity := Claimed Identifier
The Claimed Identifier is the identifier that the user claims to own,
and it is expected to remain unchanged over a long period.
[Response]
openid.identity := Verified Identifier
Therefore, when delegation is used, it becomes the ID verified
at the delegation target.
The delegation target may change frequently.
Therefore, what the RP can use as a key is the Openid.identity in the Request == Claimed Identifier.
OpenID 2.0
[Request]
openid.claimed_id := Claimed Identifier or identifier_select
The Claimed Identifier is the identifier that the user claims to own,
and it is expected to remain unchanged over a long period.
For XRI, it is the Canonical ID, and multiple inames may be
associated with it. Even in that case, they are regarded as
the same person.
However, when an OP Identifier is used, the user does not
present a Claimed Identifier in the request, so the values of
openid.claimed_id and openid.identity are always
http://specs.openid.net/auth/2.0/identifier_select
.
openid.identity := OP-Local Identifier
Unless something different is specified, the Claimed Identifier
MUST be used as openid.identity.
If http://specs.openid.net/auth/2.0/identifier_select is
specified, the OP must select and present an ID belonging
to that user. (Y! is an example of this case.)
Generally, this is the ID verified at the delegation target.
See the example in Appendix A.3 of the Spec.
[Response]
openid.claimed_id := Claimed Identifier.
For XRI, this is the Canonical ID.
When an OP Identifier is used, this is the OP Local Identifier
selected by the OP.
openid.op_endpoint := OP Endpoint URL
The URL that verifies the OP Local Identifier.
openid.identity := OP Local Identifier
The Identifier actually verified at the OP Endpoint URL
(the verified identifier of the OpenID 1.1 era).
Incidentally, claimed_id and identity are either both present or both absent.
Now, regarding the issue of what should be used as the primary key for an account on the RP side, the Spec states it clearly for 2.0.
11.5. Identifying the end user
The Claimed Identifier in a successful authentication response SHOULD be used by the Relying Party as a key for local storage of information about the user. The Claimed Identifier MAY be used as a user-visible Identifier. When displaying URL Identifiers, the fragment MAY be omitted.
Thus, in a word, the primary key is always the Claimed ID.
In other words, the primary key should be:
OpenID 2.0: openid.claimed_id in the response
OpenID 1.1: openid.identifier in the request
That is the conclusion.
An easy way to remember it is: “Use what does not change as the key.”
Related posts

OpenAI Launches Sign in with ChatGPT (Based on OpenID Connect)
(Work in progress; last updated 2026-10-02 12:39 JST) On September 29, at DevDay 2026, OpenAI officially announced Sign in with ChatGPT (SIWC). I would like to…

When Software Becomes Staff: Governance, Security, and Safety for Agentic AI
Below is the transcript of my keynote speech at EIC 2026 on May 19, 2026. The slides are provided as a PDF at the end of…

OpenID Summit Tokyo 2026 “Special Edition” Closing Keynote
The tickets apparently sold out instantly, so I had not introduced this event here; however, tomorrow, August 26, I will appear at the OpenID Summit Tokyo…
