This repository was archived by the owner on Dec 13, 2018. It is now read-only.
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
How can you 'configure' OpenIdConnectOptions CallbackPath? #1230
Closed
Description
I'm trying to set the OpenIdConnectOptions.CallbackPath through appsettings.json configuration, but it throws an exception when I attempt to access the IOptions Value property.
System.InvalidOperationException occurred
HResult=0x80131509
Message=Failed to convert '/OpenIdCallback' to type 'Microsoft.AspNetCore.Http.PathString'.
Source=Microsoft.Extensions.Configuration.Binder
StackTrace:
at Microsoft.Extensions.Configuration.ConfigurationBinder.ConvertValue(Type type, String value)
at Microsoft.Extensions.Configuration.ConfigurationBinder.BindInstance(Type type, Object instance, IConfiguration config)
...
Inner Exception 1:
NotSupportedException: TypeConverter cannot convert from System.String.
I can set this value in code, because there is an implicit conversion from string to PathString. Is there a way to set it through configuration?