[SOLVED] MacOS self hosted, IdentityServer login or signup failed

Hello, I’m submitting a…

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

Current behavior

Registering or logging in with adminEmail is successful, but failed with OIDC.

Minimal reproduction of the problem


git clone https://github.com/Squidex/squidex.git && cd squidex/src/Squidex
npm i && npm run build && npm start

2.Change the appsettings.json

    "adminEmail": "xxx",
    "adminPassword": "ZzSncL721662!",
    "oidcName": "OIDC",
    "oidcAuthority": "https://xxx.auth0.com/", ###(both tested self oid server "http://loalhost:5000/")
    "oidcClient": "xxx",
    "oidcSecret": "xxx",

3.Open Squidex.sln with Visual Studio For Mac, :arrow_forward:️Run

4.Click “Login with ExternalOidc” or “Signup with ExternalOidc”, submit the auth0 form(and user created in auth0), but(or self hosted directly) redirect to “Operation failed, We are really sorry that something went wrong.”

5.Check the MongoDB, there is no user creation in the table Identity_Users.

6.Check the log, find stackTrace: ...C:\\local\\identity\\server4...


  • [ ] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ :heavy_check_mark:️] Self hosted with other version (MacOS)
  • [ ] Cloud version


  • [:heavy_check_mark:️ ] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [ ] Firefox
  • [:heavy_check_mark:️ ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [ ] Edge


Loaded '/usr/local/share/dotnet/shared/Microsoft.NETCore.App/2.2.0/System.IO.MemoryMappedFiles.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
  "logLevel": "Error",
  "message": "An unhandled exception has occurred while executing the request.",
  "eventId": {
    "id": 1,
    "name": "UnhandledException"
  "exception": {
    "type": "System.NullReferenceException",
    "message": "Object reference not set to an instance of an object.",
  "logLevel": "Error",
  "message": "An unhandled exception has occurred while executing the request.",
  "eventId": {
    "id": 1,
    "name": "UnhandledException"
  "exception": {
    "type": "System.NullReferenceException",
    "message": "Object reference not set to an instance of an object.",
    "stackTrace": "   at Squidex.Areas.IdentityServer.Controllers.Extensions.GetExternalLoginInfoWithDisplayNameAsync(SignInManager`1 signInManager, String expectedXsrf) in /Users/.../src/Squidex/Areas/IdentityServer/Controllers/Extensions.cs:line 23\n   at Squidex.Areas.IdentityServer.Controllers.Account.AccountController.ExternalCallback(String returnUrl) in /Users/.../src/Squidex/Areas/IdentityServer/Controllers/Account/AccountController.cs:line 227\n   at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\n   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync()\n   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()\n   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)\n   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\n   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()\n   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()\n   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)\n   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\n   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()\n   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()\n   at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)\n   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\n   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\n   at IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context) in C:\\local\\identity\\server4\\IdentityServer4\\src\\Hosting\\BaseUrlMiddleware.cs:line 36\n   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.Invoke(HttpContext context)"


can you send me the connection settings to your auth0 instance so that I can test it?

Hi, Sebastian, Thanks for your reply!

Great, thanks. Will keep you updated.

You have to configure auth0 to provide the email address. I think this is the problem. I will improve the validation process to provide better logs.

Issue seems to be on my side.

I have pushed a fix to the master branch.

1 Like

Thanks! But why didn’t the other self hosted work? This is actually more important to us.

What do you mean with: “Thanks! But why didn’t the other self hosted work? This is actually more important to us.”?

Use New Identity App(squidex-identity) instead of third party (auth0)
Backend has option: New Identity App

This is the other direction. The idea is to have a custom identity server (https://github.com/squidex/squidex-identity) and use squidex as a backend to store users and other data.

The backend has new app option “New Identity App”, the app created by this option which can’t be used for custom identity server. It requires extra cloning and creation from Squidex/squidex-identity.
Am I right?

Exactly. You can read more about it here: https://medium.com/squidex/announcing-squidex-identity-authentication-on-top-of-squidex-34194766daf8

I will close this issue now as the bug itself is solved.