Closed D1mitry closed 5 years ago
Hey,
Did you re-create the tables after switching to Guid
keys?
Yes, tables has been created with a Guid
, I have CRUP operations for users which are working fine
Still, the exception clearly indicates that the expected type (Guid) was not the type found in the DB (string):
Unable to cast object of type 'System.Data.SqlTypes.SqlString' to type 'System.Data.SqlTypes.SqlGuid'
You should double-check the table definition, just to be sure.
Ok, got it now. I thought that Users tables should be just with Guid identifiers. So OpenIdDict tables should be recreated with Guid as identifiers. After this change it works as expected. Thanks.
Good to hear it's working properly!
Hi, I used the same approach as described in example here https://github.com/openiddict/openiddict-samples/tree/dev/samples/RefreshFlow, but instead of string key of Identity entity I have Guid:
My configuration looks like:
Angular Client and Authorization controller looks the same, as in example mentioned above, and Authorization (Password Flow) works good, but when application tries to refresh token it throws an error. Here is a log with stack:
From what I could see it calls
FindByIdAsync(String identifier, CancellationToken cancellationToken)
ofOpenIddict.Core.OpenIddictTokenManager
assembly, with a string identifier. Could you please advice if I've missed anything or this is an issue inOpenIddict.Core.OpenIddictTokenManager
?Thanks in advance,