IdentityServer3.EntityFramework icon indicating copy to clipboard operation
IdentityServer3.EntityFramework copied to clipboard

fix ConsentStore null excretion when no existing consent.

Open jinweijie opened this issue 8 years ago • 2 comments

because the return type is Task<IdentityServer3.Core.Models.Consent>, so we should return Task.FromResult<IdentityServer3.Core.Models.Consent>(null) instead of null. Otherwise, null exception will be raised.

jinweijie avatar Jan 22 '17 06:01 jinweijie

The method is marked with async, so the null return is already a Task. The compiler does this.

brockallen avatar Jan 22 '17 12:01 brockallen

Thanks Allen, but at runtime, an exception was thrown. I was using .Net framework 4.6.1. After I changing null with Task.FromResult<IdentityServer3.Core.Models.Consent>(null), the exception was resolved. Could you check again? Thanks.

jinweijie avatar Jan 31 '17 12:01 jinweijie