Squidex.Identity not working


#1

Hi, I’m submitting a…

[ ] Regression (a behavior that stopped working in a new release)
[v] Bug report
[ ] Performance issue
[ ] Documentation issue or request

Current behavior

Squidex.Identity doesn’t work on MacOS.

(If keep the original “url”: ''https://cloud.squidex.io", it works on http://localhost:3500)

Minimal reproduction of the problem

Git clone ‘squidex-identity’, and change the appsettings.json
Keep Identity(server) running on http://localhost:5000, then ‘dotnet run’ (Squidex.Identity)

  "app": {
    /*
     * The url to your squidex server.
     */
    "url": "http://localhost:5000",
    /*
     * The name of your app.
     */
    "appName": "identity-test",
    /*
     * Your client id.
     */
    "clientId": "identity-test:default",
    /*
     * Your client secret.
     */
    "clientSecret": "ByGPQeWwWXNVAqFylvdM/ZQso3oWzgJQWle1r3Xzk=",
    /*
     * Comma separated list of cultures.
     */
    "cultures": "en"
  }

Environment

  • [ ] Self hosted with docker
  • [ ] Self hosted with IIS
  • [v] Self hosted with other version
  • [ ] Cloud version

Browser:

  • [v] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [ ] Firefox
  • [ ] Safari (desktop)
  • [v] Safari (iOS)
  • [ ] IE
  • [ ] Edge

Others:

dotnet run

Application startup exception: System.Net.Http.HttpRequestException: Response status code does not indicate success: 400 (Bad Request).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at Squidex.ClientLibrary.Authenticator.GetBearerTokenFromServerAsync()
   at Squidex.ClientLibrary.Authenticator.GetBearerTokenAsync()
   at Squidex.ClientLibrary.SquidexClientBase.RequestAsync(HttpMethod method, String path, HttpContent content, QueryContext context)
   at Squidex.ClientLibrary.SquidexClient`2.GetAsync(Nullable`1 skip, Nullable`1 top, String filter, String orderBy, String search, QueryContext context)
   at Squidex.Identity.Model.Authentication.AuthenticationSchemeStore.<GetSchemesAsync>b__2_0() in /Users/.../Squidex.Identity/Model/Authentication/AuthenticationSchemeStore.cs:line 30
   at Squidex.Identity.Model.CachingProvider.GetOrAddAsync[T](Object key, Func`1 provider) in /Users/.../Squidex.Identity/Model/CachingProvider.cs:line 31
   at Squidex.Identity.Model.Authentication.SquidexAuthenticationSchemeProvider.GetAllSchemesAsync() in /Users/.../Squidex.Identity/Model/Authentication/SquidexAuthenticationSchemeProvider.cs:line 108
   at Squidex.Identity.Model.Authentication.SquidexAuthenticationSchemeProvider.GetSchemeAsync(String name) in /Users/.../Squidex.Identity/Model/Authentication/SquidexAuthenticationSchemeProvider.cs:line 101
   at Microsoft.AspNetCore.Builder.IdentityServerApplicationBuilderExtensions.ValidateAsync(IServiceProvider services, ILogger logger) in C:\local\identity\server4\IdentityServer4\src\Configuration\IdentityServerApplicationBuilderExtensions.cs:line 84
   at Microsoft.AspNetCore.Builder.IdentityServerApplicationBuilderExtensions.Validate(IApplicationBuilder app) in C:\local\identity\server4\IdentityServer4\src\Configuration\IdentityServerApplicationBuilderExtensions.cs:line 74
   at Microsoft.AspNetCore.Builder.IdentityServerApplicationBuilderExtensions.UseIdentityServer(IApplicationBuilder app) in C:\local\identity\server4\IdentityServer4\src\Configuration\IdentityServerApplicationBuilderExtensions.cs:line 29
   at Squidex.Identity.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env) in /Users/.../Squidex.Identity/Startup.cs:line 209
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicationBuilder app)
   at Microsoft.AspNetCore.Mvc.Internal.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.<Configure>g__MiddlewareFilterBuilder|0(IApplicationBuilder builder)
   at Microsoft.AspNetCore.HostFilteringStartupFilter.<>c__DisplayClass0_0.<Configure>b__0(IApplicationBuilder app)
   at Microsoft.AspNetCore.Hosting.Internal.AutoRequestServicesStartupFilter.<>c__DisplayClass0_0.<Configure>b__0(IApplicationBuilder builder)
   at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
crit: Microsoft.AspNetCore.Hosting.Internal.WebHost[6]
      Application startup exception
System.Net.Http.HttpRequestException: Response status code does not indicate success: 400 (Bad Request).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at Squidex.ClientLibrary.Authenticator.GetBearerTokenFromServerAsync()
   at Squidex.ClientLibrary.Authenticator.GetBearerTokenAsync()
   at Squidex.ClientLibrary.SquidexClientBase.RequestAsync(HttpMethod method, String path, HttpContent content, QueryContext context)
   at Squidex.ClientLibrary.SquidexClient`2.GetAsync(Nullable`1 skip, Nullable`1 top, String filter, String orderBy, String search, QueryContext context)
   at Squidex.Identity.Model.Authentication.AuthenticationSchemeStore.<GetSchemesAsync>b__2_0() in /Users/.../Squidex.Identity/Model/Authentication/AuthenticationSchemeStore.cs:line 30
   at Squidex.Identity.Model.CachingProvider.GetOrAddAsync[T](Object key, Func`1 provider) in /Users/.../Squidex.Identity/Model/CachingProvider.cs:line 31
   at Squidex.Identity.Model.Authentication.SquidexAuthenticationSchemeProvider.GetAllSchemesAsync() in /Users/.../Squidex.Identity/Model/Authentication/SquidexAuthenticationSchemeProvider.cs:line 108
   at Squidex.Identity.Model.Authentication.SquidexAuthenticationSchemeProvider.GetSchemeAsync(String name) in /Users/.../Squidex.Identity/Model/Authentication/SquidexAuthenticationSchemeProvider.cs:line 101
   at Microsoft.AspNetCore.Builder.IdentityServerApplicationBuilderExtensions.ValidateAsync(IServiceProvider services, ILogger logger) in C:\local\identity\server4\IdentityServer4\src\Configuration\IdentityServerApplicationBuilderExtensions.cs:line 84
   at Microsoft.AspNetCore.Builder.IdentityServerApplicationBuilderExtensions.Validate(IApplicationBuilder app) in C:\local\identity\server4\IdentityServer4\src\Configuration\IdentityServerApplicationBuilderExtensions.cs:line 74
   at Microsoft.AspNetCore.Builder.IdentityServerApplicationBuilderExtensions.UseIdentityServer(IApplicationBuilder app) in C:\local\identity\server4\IdentityServer4\src\Configuration\IdentityServerApplicationBuilderExtensions.cs:line 29
   at Squidex.Identity.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env) in /Users/.../Squidex.Identity/Startup.cs:line 209
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicationBuilder app)
   at Microsoft.AspNetCore.Mvc.Internal.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.<Configure>g__MiddlewareFilterBuilder|0(IApplicationBuilder builder)
   at Microsoft.AspNetCore.HostFilteringStartupFilter.<>c__DisplayClass0_0.<Configure>b__0(IApplicationBuilder app)
   at Microsoft.AspNetCore.Hosting.Internal.AutoRequestServicesStartupFilter.<>c__DisplayClass0_0.<Configure>b__0(IApplicationBuilder builder)
   at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()

Unhandled Exception: System.Net.Http.HttpRequestException: Response status code does not indicate success: 400 (Bad Request).
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at Squidex.ClientLibrary.Authenticator.GetBearerTokenFromServerAsync()
   at Squidex.ClientLibrary.Authenticator.GetBearerTokenAsync()
   at Squidex.ClientLibrary.SquidexClientBase.RequestAsync(HttpMethod method, String path, HttpContent content, QueryContext context)
   at Squidex.ClientLibrary.SquidexClient`2.GetAsync(Nullable`1 skip, Nullable`1 top, String filter, String orderBy, String search, QueryContext context)
   at Squidex.Identity.Model.Authentication.AuthenticationSchemeStore.<GetSchemesAsync>b__2_0() in /Users/.../Squidex.Identity/Model/Authentication/AuthenticationSchemeStore.cs:line 30
   at Squidex.Identity.Model.CachingProvider.GetOrAddAsync[T](Object key, Func`1 provider) in /Users/.../Squidex.Identity/Model/CachingProvider.cs:line 31
   at Squidex.Identity.Model.Authentication.SquidexAuthenticationSchemeProvider.GetAllSchemesAsync() in /Users/.../Squidex.Identity/Model/Authentication/SquidexAuthenticationSchemeProvider.cs:line 108
   at Squidex.Identity.Model.Authentication.SquidexAuthenticationSchemeProvider.GetSchemeAsync(String name) in /Users/.../Squidex.Identity/Model/Authentication/SquidexAuthenticationSchemeProvider.cs:line 101
   at Microsoft.AspNetCore.Builder.IdentityServerApplicationBuilderExtensions.ValidateAsync(IServiceProvider services, ILogger logger) in C:\local\identity\server4\IdentityServer4\src\Configuration\IdentityServerApplicationBuilderExtensions.cs:line 84
   at Microsoft.AspNetCore.Builder.IdentityServerApplicationBuilderExtensions.Validate(IApplicationBuilder app) in C:\local\identity\server4\IdentityServer4\src\Configuration\IdentityServerApplicationBuilderExtensions.cs:line 74
   at Microsoft.AspNetCore.Builder.IdentityServerApplicationBuilderExtensions.UseIdentityServer(IApplicationBuilder app) in C:\local\identity\server4\IdentityServer4\src\Configuration\IdentityServerApplicationBuilderExtensions.cs:line 29
   at Squidex.Identity.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env) in /Users/.../Squidex.Identity/Startup.cs:line 209
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicationBuilder app)
   at Microsoft.AspNetCore.Mvc.Internal.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.<Configure>g__MiddlewareFilterBuilder|0(IApplicationBuilder builder)
   at Microsoft.AspNetCore.HostFilteringStartupFilter.<>c__DisplayClass0_0.<Configure>b__0(IApplicationBuilder app)
   at Microsoft.AspNetCore.Hosting.Internal.AutoRequestServicesStartupFilter.<>c__DisplayClass0_0.<Configure>b__0(IApplicationBuilder builder)
   at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
   at Microsoft.AspNetCore.Hosting.Internal.WebHost.StartAsync(CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token, String shutdownMessage)
   at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token)
   at Microsoft.AspNetCore.Hosting.WebHostExtensions.Run(IWebHost host)
   at Squidex.Identity.Program.Main(String[] args) in /Users/.../Squidex.Identity/Program.cs:line 17


Thanks for reading.


#2

Have you also updated the client id and secret?


#3

Thanks, after updating the client id and secret, it run successful.
Visit to ‘localhost:3500’ and submit the register form, I got some error messages:

warn: Microsoft.AspNetCore.Cors.Infrastructure.CorsService[11]
      The CORS protocol does not allow specifying a wildcard (any) origin and credentials at the same time. Configure the policy by listing individual origins if credentials needs to be supported.
fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
      An unhandled exception has occurred while executing the request.
Newtonsoft.Json.JsonSerializationException: Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.List`1[Squidex.Identity.Model.UserLogin]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.
To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.
Path 'items[0].data.logins.iv', line 1, position 697.
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.Serialization.JsonSerializerProxy.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
   at Squidex.ClientLibrary.InvariantConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
   at Squidex.ClientLibrary.HttpClientExtensions.ReadAsJsonAsync[T](HttpContent content)
   at Squidex.ClientLibrary.SquidexClient`2.GetAsync(Nullable`1 skip, Nullable`1 top, String filter, String orderBy, String search, QueryContext context)
   at Squidex.Identity.Model.UserStore.FindByNameAsync(String normalizedUserName, CancellationToken cancellationToken) in /Users/.../Squidex.Identity/Model/UserStore.cs:line 65
   at Microsoft.AspNetCore.Identity.UserManager`1.FindByNameAsync(String userName)
   at Microsoft.AspNetCore.Identity.UserValidator`1.ValidateUserName(UserManager`1 manager, TUser user, ICollection`1 errors)
   at Microsoft.AspNetCore.Identity.UserValidator`1.ValidateAsync(UserManager`1 manager, TUser user)
   at Microsoft.AspNetCore.Identity.UserManager`1.ValidateUserAsync(TUser user)
   at Microsoft.AspNetCore.Identity.UserManager`1.CreateAsync(TUser user)
   at Microsoft.AspNetCore.Identity.UserManager`1.CreateAsync(TUser user, String password)
   at Squidex.Identity.Pages.RegisterModel.OnPostAsync() in /Users/.../Squidex.Identity/Pages/Register.cshtml.cs:line 96
   at Microsoft.AspNetCore.Mvc.RazorPages.Internal.ExecutorFactory.GenericTaskHandlerMethod.Convert[T](Object taskAsObject)
   at Microsoft.AspNetCore.Mvc.RazorPages.Internal.ExecutorFactory.GenericTaskHandlerMethod.Execute(Object receiver, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker.InvokeHandlerMethodAsync()
   at Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker.InvokeNextPageFilterAsync()
   at Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker.Rethrow(PageHandlerExecutedContext context)
   at Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker.InvokeInnerFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
   at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
   at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events) in C:\local\identity\server4\IdentityServer4\src\Hosting\IdentityServerMiddleware.cs:line 72
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.InvokeCore(HttpContext context)
   at IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context) in C:\local\identity\server4\IdentityServer4\src\Hosting\BaseUrlMiddleware.cs:line 36
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.MigrationsEndPointMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.DatabaseErrorPageMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.DatabaseErrorPageMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)


Web view

JsonSerializationException: Cannot deserialize the current JSON object (e.g. {“name”:“value”}) into type ‘System.Collections.Generic.List`1[Squidex.Identity.Model.UserLogin]’ because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly. To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object. Path ‘items[0].data.logins.iv’, line 1, position 697.

Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, bool checkAdditionalContent)
Newtonsoft.Json.Serialization.JsonSerializerProxy.DeserializeInternal(JsonReader reader, Type objectType)
Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
Squidex.ClientLibrary.InvariantConverter.ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, object existingValue)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, object target)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, string id)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, object target)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, string id)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, string id)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, object existingValue, string id)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, object target)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, string id)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, bool checkAdditionalContent)
Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
Newtonsoft.Json.JsonConvert.DeserializeObject(string value, Type type, JsonSerializerSettings settings)
Newtonsoft.Json.JsonConvert.DeserializeObject(string value, JsonSerializerSettings settings)
Newtonsoft.Json.JsonConvert.DeserializeObject(string value)
Squidex.ClientLibrary.HttpClientExtensions.ReadAsJsonAsync(HttpContent content)
Squidex.ClientLibrary.SquidexClient<TEntity, TData>.GetAsync(Nullable skip, Nullable top, string filter, string orderBy, string search, QueryContext context)
Squidex.Identity.Model.UserStore.FindByNameAsync(string normalizedUserName, CancellationToken cancellationToken) in UserStore.cs
+
var result = await apiClient.GetAsync(filter: $“data/normalizedUsername/iv eq ‘{normalizedUserName}’”);
Microsoft.AspNetCore.Identity.UserManager.FindByNameAsync(string userName)
Microsoft.AspNetCore.Identity.UserValidator.ValidateUserName(UserManager manager, TUser user, ICollection errors)
Microsoft.AspNetCore.Identity.UserValidator.ValidateAsync(UserManager manager, TUser user)
Microsoft.AspNetCore.Identity.UserManager.ValidateUserAsync(TUser user)
Microsoft.AspNetCore.Identity.UserManager.CreateAsync(TUser user)
Microsoft.AspNetCore.Identity.UserManager.CreateAsync(TUser user, string password)
Squidex.Identity.Pages.RegisterModel.OnPostAsync() in Register.cshtml.cs
+
var result = await UserManager.CreateAsync(user, Input.Password);
Microsoft.AspNetCore.Mvc.RazorPages.Internal.ExecutorFactory+GenericTaskHandlerMethod.Convert(object taskAsObject)
Microsoft.AspNetCore.Mvc.RazorPages.Internal.ExecutorFactory+GenericTaskHandlerMethod.Execute(object receiver, object[] arguments)
Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker.InvokeHandlerMethodAsync()
Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker.InvokeNextPageFilterAsync()
Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker.Rethrow(PageHandlerExecutedContext context)
Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker.InvokeInnerFilterAsync()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events) in C:\local\identity\server4\IdentityServer4\src\Hosting\IdentityServerMiddleware.cs
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.InvokeCore(HttpContext context)
IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context) in C:\local\identity\server4\IdentityServer4\src\Hosting\BaseUrlMiddleware.cs
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.MigrationsEndPointMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.DatabaseErrorPageMiddleware.Invoke(HttpContext httpContext)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.DatabaseErrorPageMiddleware.Invoke(HttpContext httpContext)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)


#4

Thank you very much. I will have a look. Please note that the Squidex.Identity is not in RTM mode yet. If you want to contribute and help to improve it you are very welcome.


#5

Thanks for your help, please test the pull request.

I get a new failed messages by Service Point :joy:

400 That’s and error.
Sorry, an error occurred. The team is already working on that.
Error: Unknown client or client not enabled


#6

Thats not the reason. The reason is that the default value for the json property is an obj {} which cannot be converted to an array. It seems that the Squidex behavior has changed here a little bit. I am working on a fix.


#7

I have pushed a fix for this problem.


#8

It’s perfect! Thank you very much.

Last step, where to get Settings for custom oidc server?
I tried, but get ‘Error: Unknown client or client not enabled’.
May be I should help your team to improve the squidex-identity Doc.

    /*
     * Settings for your custom oidc server.
     */
    "oidcName": "OIDC",
    "oidcAuthority": "http://localhost:3500/",
    "oidcClient": "adb9793829ddae60",
    "oidcSecret": "VFZg+aOG4OrQYl8j4/kYpYlGIPq/5EtQ9q2VK0Y89H8rRPib1oZIvG1AwRTrhqcBI7MyW3k0yUcy1Afjvanwow==",


#9

This would be very welcome.


#10

Where have you created your client?


#11

project/squidex
project/squidex-identify

I have no idea to create client with squidex-identify


#12

The idea of squidex-identity is to manage all data in squidex itself. So you can also create clients there in the schema.


#13

I just cloned the identity, not found admin setting and dashboard.


#14

The whole idea of squidex identity is to be a solution on top of squidex. Squidex hosts the database and configuration and (almost) all data and Squidex identity is just the UI and open id connect server. So you can go to your squidex instance and create a predefined app with all the schemas. Here you will find users, claims, clients and so on and you can manage them there.


#15

This is part of what I`ve got. Couldyou type a little detailed steps please, I need to know settings for custom oidc server in Squidex.It allways failed, could you write Minimal reproduction of the success, both of Squidex and Squidex Identity, like what I did, 1.clone…2…3…, Come on, I greatly appreciate your help.


#16

Sure, I am about to finish the 2.0 release of Squidex and when I am done with this I can write the docs. Just some hints so far:

1. Setup of Squidex identity

  • Clone Squidex.Identity repository
  • Create an identity app in your Squidex instance (local or cloud)
  • Update the configuration with the url to your squidex instance and the client id and secret of the default client.

2. General application settings:

If you create a identity app in Squidex you will see a schema with the settings, where you can upload a logo, footer text, privacy settings and so on. Most settings are optional but you must setup credentials to an smpt server. My recommendation is mailjet: https://www.mailjet.com/

3. External authentication providers

If you want to use external authentication providers you can setup them in the authentication schemes section, here is an example for Google.

You have to create an OAuth 2.0-Client-IDs in the google developer console. You have to define the redirect_uri in this process and you must use http://localhost:3500/signin-google.

4. External clients

When you want to connect an external application to Squidex identity you have to configure a client. This is a little bit complicated, but you can find all settings here: http://docs.identityserver.io/en/latest/reference/client.html


#17

Thanks, now it’s ‘Invalid scope’
I searched and tried to debug but not working.

fail: IdentityServer4.Validation.ScopeValidator[0]
      Invalid scope: permissions

1


#18

Just keep the scopes empty for now


#19

Keep the scopes empty, same to ‘Invalid scope: permissions’,all the files are original.
1


#20

Where is the snippet coming from?