-
-
Notifications
You must be signed in to change notification settings - Fork 763
NullReferenceException in DefaultClaimsProvider since update to 2.6.0 #3470
Comments
hi! So, I downgrade to 2.5.4 and it works again. |
Also using refresh tokens and 2.6.0, but not the mongodb package. Not having issues so far. This issue probably relates to: #3458 |
Can you check in the DB and show me what one of your refresh token records looks like (and omit the sensitive stuff, please)? I tried to repo and I can't, so the only thing that would make sense to me is that the Subject/Claims associated with the record is missing or not getting deserialized. |
I see the mongodb implementation does not serialize the claimsprincipal. Could that be it? Maybe @jageall can chime in :) |
I'll get a package with a fix for this out today |
that took a bit longer than expected due to some changes in mongodb upsert behaviour :( but 2.1.1 of the mongodb package has been updated to work with 2.6.0 |
@cypressious : can you test the new mongodb package, and see if that solves your issues? |
Seems to work. Thanks to all of you! |
How are you implementing The MongoDB implementation was lacking the |
@johnkors EDIT: My mistake, I misread it for IRefreshTokenService! |
The default is in-memory, not backed by SQL. |
@johnkors Sorry about the confusion, I misread it. So we do have a RefreshTokenStore where we just inserted the freshly generated RefreshToken into the table, and now when trying to change into a ReUse-scheme we instead check first if it exists, update it in that case, otherwise just insert. And from what I can see we use a JsonConvert from Newtonsoft.Json a default JsonSerializerSettings containing a ClaimConverter, which extends a JsonConverter. |
Do you have something in that SerializerSettings for converting the Similar to: |
@johnkors No we did not do that, so I'm currently implementing one right now. Is this a new thing in 2.6.0? Considering we had no issues with this before, I mean. Or was it just a silent error/corruption previously? |
No, the |
@johnkors That makes sense, because it did crash in our |
Question / Issue
After upgrading to 2.6.0 from 2.5.4 I get this exception when trying to log in. I'm using https://www.nuget.org/packages/IdentityServer3.MongoDb, a custom
IUserService
and as well asRelevant parts of the log file
The text was updated successfully, but these errors were encountered: