Skip to content

Reason for subject check when fetching user info? #790

Closed Answered by panva
electerious asked this question in Q&A
Discussion options

You must be logged in to vote

It is part of the spec, https://openid.net/specs/openid-connect-core-1_0.html#UserInfoResponse

The sub Claim in the UserInfo Response MUST be verified to exactly match the sub Claim in the ID Token; if they do not match, the UserInfo Response values MUST NOT be used.

And it was part of v5 when the input to userInfo() was a TokenSet that contained an ID Token.

It also looks like it's just a client-side validation, which could be done by the user after the fetch if he wants to validate the subject.

I doubt they would.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@electerious
Comment options

@panva
Comment options

panva May 9, 2025
Maintainer

Answer selected by electerious
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants