MV10 / mv10.github.io

McGuireV10's personal blog
MIT License
4 stars 2 forks source link

Blazor Login Expiration with OpenID Connect - Auth / Cache Data "SubjectId" is misleading #43

Open ViRuSTriNiTy opened 4 years ago

ViRuSTriNiTy commented 4 years ago

Hi there,

the article https://mcguirev10.com/2019/12/16/blazor-login-expiration-with-openid-connect.html shows a class for auth and cache data with a property SubjectId. This property is later initialized from the sid claim. This is misleading because the sid claim is actually the session id.

Reference: https://openid.net/specs/openid-connect-frontchannel-1_0.html#rfc.section.3

sid Session ID - String identifier for a Session. This represents a Session of a User Agent or device for a logged-in End-User

The subject ID should be retrieved from the http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier claim instead.

The documentation and source code should be updated accordingly to avoid confusion.

So lonG Daniel