Open afboteros opened 8 years ago
Perhaps something on Mono doesn't support/handle DateTimeOffset?
Is possibly a Mono bug, according to this bug report: https://bugzilla.xamarin.com/show_bug.cgi?id=39116
Any possible workaround on the IdSrv3 side, any possible way to override the functionality related to that Expiry property?
Thanks.
I know this is not ideal, but you can always build your own implementation of the various IXxxStore interfaces and change to DateTime. Perhaps even search for others that have already done this.
Hi, any reason to use DateTimeOffset instead of DateTime?
We are running into a similar issue when using MySQL as the backend database instead of MSSQL. MySQL doesn't have a corresponding data type for DateTimeOffset. Is there any way to use a different datatype to allow more support across RDBMSs?
"ExceptionMessage": "Schema specified is not valid. Errors: \r\n(79,12) : error 2019: Member Mapping specified is not valid. The type 'Edm.DateTimeOffset[Nullable=True,DefaultValue=,Precision=]' of member 'Expiration' in type 'PowerPlan.IdentityProvider.Models.ClientSecret' is not compatible with 'MySql.timestamp[Nullable=True,DefaultValue=,Precision=0]' of member 'Expiration' in type
It's most likely because it's a date time offset. Does the EF layer on Mono support that? I don't think MySql does.
@brockallen Yes, I understood that, but is there any chance of this being changed to something that is more widely supported?
We have done that in IdentityServer4: https://github.com/IdentityServer/IdentityServer4/issues/222
As for IdentityServer3 -- it would be a major (breaking) change. In the meantime, the beat approach would be to implement your own stores and map to what your DB supports. I know this is not ideal. If you search around, perhaps someone has already done this.
I made a fork to handle the DateTimeOffset changes for EF and MySQL. I don't use it with Mono, but I don't see that being an issue.
https://github.com/Nicholi/IdentityServer3.EntityFramework.MySql/tree/mydev There aren't too many modifications, most of the other stuff was just related to updating to newer nuget restore methods. Glad to hear we don't have DateTimeOffset for Ids4.
We are getting the following error when authenticating a client on IdentityServer on Mono:
Looking for the error trace we found that EntityFramework on Mono is returning a nvarchar type when querying the Tokens table of OperationalDbContext that is registered to the factory on Startup instead of a DatetimeOffset type.
Any possible workarround for this?
Thanks.