IIS setup - Windows Auth logoff

When a page is setup to use Windows Auth with IIS to login, the Sign Out button on the webpages does nothing. You have to end your browser session completely in order to get a new login prompt when revisiting the site.

Would it be possible to get the Sign Out button to work in cases of IIS WIndows Auth webpage setups?

2 Likes

Not sure if this has been answered already but I second this.
For me, it’s pass through authentication so I dont see a login page at all, making the sign out button redundant (clicking it just takes me back to the dashboard), is there a way to hide this?

2.7.0 the sign out button works

The sign off won’t do anything when using single-sign on. It works for other auth methods. Could you please file a GitHub issue for this? There might be some way to hide it with CSS but would have to play with it.

1 Like

No problem and a minor detail I’m sure but I appreciate the reply. Keep up the good work!!

I see the GitHub issue was closed… is there a solution to hide the Sign Out button?

Would like to see this removed when using the new OpenId Auth method - Testing it out with Azure to get the auth token, and when clicking signout it takes me back to the UD login page, but then if I click sign in again I get a 500 error. I have reload the page from the root of the URL in order to login again.

Maybe a bug with the signout? could be easier to just hide it.

The sign out button is hidden when you specify -PassThru for the Authenticaiton Method. That said, if you have multiple sign in methods, it will show the sign out link.

Can you please try and get a log to see what the 500 error is?

hmmm, I had tried using -PassThru and noticed that in Chrome the Sign Out link is present, but on Edge and Internet Explorer the Sign Out link is gone (see below)

Also, I see in the browser a 500 on the /signin-callback POST - I will have to spend some time digging into the logs to try and pinpoint.

The logs were actually pretty good at giving useful error messages when I was trying to set this up. I’ll have to test out Chrome and the -PassThru argument. I hadn’t noticed that wasn’t working there.

So I turned on logging and it seems when the dashboard is initially visited from the /login page the authentication fails. When I visit the dashboard from the root / I can authenticate successfully. When you click the signout button it redirects to you the /login.

Below are the logs (did it a few times) when logging out and trying to log back in and receive the 500 error.

I see there is an OpenId cookie not found error then an unhandled exception. not sure what it all means though.

21:16:24 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 POST http://localhost/signin-callback application/x-www-form-urlencoded 7024
21:16:25 [Warn] Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler '.AspNetCore.Correlation.OpenID.2jzcxQeMOubJehza820oiFkOZ2i6tdGmsIVFuaaUcN8' cookie not found.
21:16:25 [Info] Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler Error from RemoteAuthentication: Correlation failed..
21:16:25 [Error] Microsoft.AspNetCore.Server.Kestrel Connection id "0HLS1K58HP8T5", Request id "0HLS1K58HP8T5:00000006": An unhandled exception was thrown by the application.

FULL LOG

21:15:59 [Debug] Quartz.Core.QuartzSchedulerThread Batch acquisition of 0 triggers
21:16:01 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://localhost/login
21:16:01 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 18.9823ms 200 text/html; charset=utf-8
21:16:01 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://localhost/api/internal/dashboard/theme
21:16:01 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://localhost/api/internal/javascript/plugin
21:16:01 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Route matched with {action = “Theme”, controller = “Dashboard”}. Executing action UniversalDashboard.Controllers.DashboardController.Theme (UniversalDashboard)
21:16:01 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Route matched with {action = “Plugin”, controller = “JavaScript”}. Executing action PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Plugin (UniversalDashboard)
21:16:01 [Debug] PowerShellExecutionService ExecutionService constructor
21:16:01 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executing action method PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Plugin (UniversalDashboard) - Validation state: Valid
21:16:01 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executing action method UniversalDashboard.Controllers.DashboardController.Theme (UniversalDashboard) - Validation state: Valid
21:16:01 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action method PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Plugin (UniversalDashboard), returned result Microsoft.AspNetCore.Mvc.ContentResult in 5.0089ms.
21:16:01 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action method UniversalDashboard.Controllers.DashboardController.Theme (UniversalDashboard), returned result Microsoft.AspNetCore.Mvc.ContentResult in 0.5633ms.
21:16:01 [Info] Microsoft.AspNetCore.Mvc.Infrastructure.ContentResultExecutor Executing ContentResult with HTTP Response ContentType of text/javascript
21:16:01 [Info] Microsoft.AspNetCore.Mvc.Infrastructure.ContentResultExecutor Executing ContentResult with HTTP Response ContentType of text/css
21:16:01 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action UniversalDashboard.Controllers.DashboardController.Theme (UniversalDashboard) in 53.4478ms
21:16:01 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 89.7689ms 200 text/css
21:16:01 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Plugin (UniversalDashboard) in 66.6163ms
21:16:01 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 100.6433ms 200 text/javascript
21:16:01 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://localhost/login-page
21:16:01 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Route matched with {action = “GetLogin”, controller = “Authentication”}. Executing action UniversalDashboard.Controllers.AuthenticationController.GetLogin (UniversalDashboard)
21:16:01 [Debug] PowerShellExecutionService ExecutionService constructor
21:16:01 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executing action method UniversalDashboard.Controllers.AuthenticationController.GetLogin (UniversalDashboard) - Validation state: Valid
21:16:01 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action method UniversalDashboard.Controllers.AuthenticationController.GetLogin (UniversalDashboard), returned result Microsoft.AspNetCore.Mvc.JsonResult in 0.0177ms.
21:16:01 [Info] Microsoft.AspNetCore.Mvc.Formatters.Json.Internal.JsonResultExecutor Executing JsonResult, writing value of type ‘UniversalDashboard.Models.LoginPage’.
21:16:01 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action UniversalDashboard.Controllers.AuthenticationController.GetLogin (UniversalDashboard) in 30.6329ms
21:16:01 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 56.0804ms 200 application/json; charset=utf-8
21:16:10 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 POST http://localhost/signin-callback application/x-www-form-urlencoded 7024
> 21:16:10 [Warn] Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler ‘.AspNetCore.Correlation.OpenID.2jzcxQeMOubJehza820oiFkOZ2i6tdGmsIVFuaaUcN8’ cookie not found.
> 21:16:10 [Info] Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler Error from RemoteAuthentication: Correlation failed…
> 21:16:10 [Error] Microsoft.AspNetCore.Server.Kestrel Connection id “0HLS1K58HP8T6”, Request id “0HLS1K58HP8T6:00000002”: An unhandled exception was thrown by the application.
**> 21:16:10 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 24.5951ms 500 **
> 21:16:17 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://localhost/login
21:16:17 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 12.4869ms 200 text/html; charset=utf-8
21:16:18 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://localhost/api/internal/dashboard/theme
21:16:18 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Route matched with {action = “Theme”, controller = “Dashboard”}. Executing action UniversalDashboard.Controllers.DashboardController.Theme (UniversalDashboard)
21:16:18 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://localhost/api/internal/javascript/plugin
21:16:18 [Debug] PowerShellExecutionService ExecutionService constructor
21:16:18 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Route matched with {action = “Plugin”, controller = “JavaScript”}. Executing action PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Plugin (UniversalDashboard)
21:16:18 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executing action method UniversalDashboard.Controllers.DashboardController.Theme (UniversalDashboard) - Validation state: Valid
21:16:18 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executing action method PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Plugin (UniversalDashboard) - Validation state: Valid
21:16:18 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action method UniversalDashboard.Controllers.DashboardController.Theme (UniversalDashboard), returned result Microsoft.AspNetCore.Mvc.ContentResult in 0.6607ms.
21:16:18 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action method PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Plugin (UniversalDashboard), returned result Microsoft.AspNetCore.Mvc.ContentResult in 5.6796ms.
21:16:18 [Info] Microsoft.AspNetCore.Mvc.Infrastructure.ContentResultExecutor Executing ContentResult with HTTP Response ContentType of text/css
21:16:18 [Info] Microsoft.AspNetCore.Mvc.Infrastructure.ContentResultExecutor Executing ContentResult with HTTP Response ContentType of text/javascript
21:16:18 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action UniversalDashboard.Controllers.DashboardController.Theme (UniversalDashboard) in 83.499ms
21:16:18 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 121.3005ms 200 text/css
21:16:18 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Plugin (UniversalDashboard) in 72.0036ms
21:16:18 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 125.3638ms 200 text/javascript
21:16:19 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://localhost/login-page
21:16:19 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Route matched with {action = “GetLogin”, controller = “Authentication”}. Executing action UniversalDashboard.Controllers.AuthenticationController.GetLogin (UniversalDashboard)
21:16:19 [Debug] PowerShellExecutionService ExecutionService constructor
21:16:19 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executing action method UniversalDashboard.Controllers.AuthenticationController.GetLogin (UniversalDashboard) - Validation state: Valid
21:16:19 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action method UniversalDashboard.Controllers.AuthenticationController.GetLogin (UniversalDashboard), returned result Microsoft.AspNetCore.Mvc.JsonResult in 0.0241ms.
21:16:19 [Info] Microsoft.AspNetCore.Mvc.Formatters.Json.Internal.JsonResultExecutor Executing JsonResult, writing value of type ‘UniversalDashboard.Models.LoginPage’.
21:16:19 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action UniversalDashboard.Controllers.AuthenticationController.GetLogin (UniversalDashboard) in 28.5237ms
21:16:19 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 47.9314ms 200 application/json; charset=utf-8
21:16:24 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 POST http://localhost/signin-callback application/x-www-form-urlencoded 7024
> 21:16:25 [Warn] Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler ‘.AspNetCore.Correlation.OpenID.2jzcxQeMOubJehza820oiFkOZ2i6tdGmsIVFuaaUcN8’ cookie not found.
> 21:16:25 [Info] Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler Error from RemoteAuthentication: Correlation failed…
> 21:16:25 [Error] Microsoft.AspNetCore.Server.Kestrel Connection id “0HLS1K58HP8T5”, Request id “0HLS1K58HP8T5:00000006”: An unhandled exception was thrown by the application.
**> 21:16:25 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 30.0999ms 500 **
> 21:16:27 [Debug] Quartz.Core.QuartzSchedulerThread Batch acquisition of 0 triggers
21:16:31 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://localhost/
21:16:31 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 10.7502ms 200 text/html; charset=utf-8
21:16:34 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://localhost/login
21:16:34 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 13.1751ms 200 text/html; charset=utf-8
21:16:35 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://localhost/api/internal/dashboard/theme
21:16:35 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://localhost/api/internal/javascript/plugin
21:16:35 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Route matched with {action = “Theme”, controller = “Dashboard”}. Executing action UniversalDashboard.Controllers.DashboardController.Theme (UniversalDashboard)
21:16:35 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Route matched with {action = “Plugin”, controller = “JavaScript”}. Executing action PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Plugin (UniversalDashboard)
21:16:35 [Debug] PowerShellExecutionService ExecutionService constructor
21:16:35 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executing action method PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Plugin (UniversalDashboard) - Validation state: Valid
21:16:35 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executing action method UniversalDashboard.Controllers.DashboardController.Theme (UniversalDashboard) - Validation state: Valid
21:16:35 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action method PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Plugin (UniversalDashboard), returned result Microsoft.AspNetCore.Mvc.ContentResult in 9.4015ms.
21:16:35 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action method UniversalDashboard.Controllers.DashboardController.Theme (UniversalDashboard), returned result Microsoft.AspNetCore.Mvc.ContentResult in 0.5156ms.
21:16:35 [Info] Microsoft.AspNetCore.Mvc.Infrastructure.ContentResultExecutor Executing ContentResult with HTTP Response ContentType of text/javascript
21:16:35 [Info] Microsoft.AspNetCore.Mvc.Infrastructure.ContentResultExecutor Executing ContentResult with HTTP Response ContentType of text/css
21:16:35 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action UniversalDashboard.Controllers.DashboardController.Theme (UniversalDashboard) in 78.0371ms
21:16:35 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 122.5046ms 200 text/css
21:16:35 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Plugin (UniversalDashboard) in 76.1344ms
21:16:35 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 136.578ms 200 text/javascript
21:16:35 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://localhost/login-page
21:16:35 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Route matched with {action = “GetLogin”, controller = “Authentication”}. Executing action UniversalDashboard.Controllers.AuthenticationController.GetLogin (UniversalDashboard)
21:16:35 [Debug] PowerShellExecutionService ExecutionService constructor
21:16:35 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executing action method UniversalDashboard.Controllers.AuthenticationController.GetLogin (UniversalDashboard) - Validation state: Valid
21:16:35 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action method UniversalDashboard.Controllers.AuthenticationController.GetLogin (UniversalDashboard), returned result Microsoft.AspNetCore.Mvc.JsonResult in 0.0231ms.
21:16:35 [Info] Microsoft.AspNetCore.Mvc.Formatters.Json.Internal.JsonResultExecutor Executing JsonResult, writing value of type ‘UniversalDashboard.Models.LoginPage’.
21:16:35 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action UniversalDashboard.Controllers.AuthenticationController.GetLogin (UniversalDashboard) in 30.4556ms
21:16:35 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 62.0359ms 200 application/json; charset=utf-8
21:16:50 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://localhost/login
21:16:50 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 12.6773ms 200 text/html; charset=utf-8
21:16:51 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://localhost/api/internal/dashboard/theme
21:16:51 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://localhost/api/internal/javascript/plugin
21:16:51 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Route matched with {action = “Theme”, controller = “Dashboard”}. Executing action UniversalDashboard.Controllers.DashboardController.Theme (UniversalDashboard)
21:16:51 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Route matched with {action = “Plugin”, controller = “JavaScript”}. Executing action PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Plugin (UniversalDashboard)
21:16:51 [Debug] PowerShellExecutionService ExecutionService constructor
21:16:51 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executing action method PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Plugin (UniversalDashboard) - Validation state: Valid
21:16:51 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executing action method UniversalDashboard.Controllers.DashboardController.Theme (UniversalDashboard) - Validation state: Valid
21:16:51 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action method PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Plugin (UniversalDashboard), returned result Microsoft.AspNetCore.Mvc.ContentResult in 6.1238ms.
21:16:51 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action method UniversalDashboard.Controllers.DashboardController.Theme (UniversalDashboard), returned result Microsoft.AspNetCore.Mvc.ContentResult in 0.5496ms.
21:16:51 [Info] Microsoft.AspNetCore.Mvc.Infrastructure.ContentResultExecutor Executing ContentResult with HTTP Response ContentType of text/javascript
21:16:51 [Info] Microsoft.AspNetCore.Mvc.Infrastructure.ContentResultExecutor Executing ContentResult with HTTP Response ContentType of text/css
21:16:51 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action UniversalDashboard.Controllers.DashboardController.Theme (UniversalDashboard) in 68.569ms
21:16:51 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 102.1807ms 200 text/css
21:16:51 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action PowerShellProTools.UniversalDashboard.Controllers.JavaScriptController.Plugin (UniversalDashboard) in 79.117ms
21:16:51 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 114.004ms 200 text/javascript
21:16:51 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request starting HTTP/1.1 GET http://localhost/login-page
21:16:51 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Route matched with {action = “GetLogin”, controller = “Authentication”}. Executing action UniversalDashboard.Controllers.AuthenticationController.GetLogin (UniversalDashboard)
21:16:51 [Debug] PowerShellExecutionService ExecutionService constructor
21:16:51 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executing action method UniversalDashboard.Controllers.AuthenticationController.GetLogin (UniversalDashboard) - Validation state: Valid
21:16:51 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action method UniversalDashboard.Controllers.AuthenticationController.GetLogin (UniversalDashboard), returned result Microsoft.AspNetCore.Mvc.JsonResult in 0.0262ms.
21:16:51 [Info] Microsoft.AspNetCore.Mvc.Formatters.Json.Internal.JsonResultExecutor Executing JsonResult, writing value of type ‘UniversalDashboard.Models.LoginPage’.
21:16:51 [Info] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker Executed action UniversalDashboard.Controllers.AuthenticationController.GetLogin (UniversalDashboard) in 29.9701ms
21:16:51 [Info] Microsoft.AspNetCore.Hosting.Internal.WebHost Request finished in 52.8438ms 200 application/json; charset=utf-8
21:16:53 [Debug] Quartz.Core.QuartzSchedulerThread Batch acquisition of 0 triggers

I’m sure you’ve probably tried this but just to make sure…

I had the same issue (sign out not dissapearing on chrome but does in IE) after the update to 2.8.0.
I cleared my chrome browser cache and revisited and it was gone.

Interesting. I wonder if there is a bug when hitting the /login page when you have this type of auth enabled. I’ll play with it more today.

Just to be clear:

  • Hitting the root ‘/’ works and logs you in
  • Hitting ‘/login’ causes the 500
  • The sign out causes a redirect to ‘/login’ which thus causes the 500

@adam After updating from 2.8.0 to 2.8.2 the sign out button is gone. I have not added the PassThru parameter to New-UDLoginPage and have not changed anything except the new universaldashboard release. I am using Any idea?
I have tested it with Firefox, Edge Chromium, Chrome and Brave. Same behavior (Cache/Cookies deleted)
The login is working.

I am using a custom function (Test-Credential) for valdiating the credentials at logon time. (No Single-Sign-On etc.)

$AuthenticationMethod = New-UDAuthenticationMethod -Endpoint {
      param([PSCredential]$Credentials)
      # insert new authorization rules here before this if clause...
      if (Test-Credential -Credential $Credentials)
      {
        New-UDAuthenticationResult -Success -UserName $Credentials.UserName
        # Save these correct credentials in a session variable, so we can use this credential object inside the dashboard
        $Session:Creds = $Credentials
      }
      # Authentication not successful, throw error and try again
      New-UDAuthenticationResult -ErrorMessage $Cache:Config.Theme.LoginErrorText
    }

And the login page:

if ($AuthenticationMethod)
    {
      $LoginPage = New-UDLoginPage -AuthenticationMethod $AuthenticationMethod -Logo $logo -PageBackgroundColor $Cache:Config.Theme.LoginBGColor -Title $Cache:Config.Theme.LoginTitle -LoginFormBackgroundColor $Cache:Config.Theme.LoginFormBGColor -LoginFormFontColor $Cache:Config.Theme.LoginFormFontColor -LoginButtonBackgroundColor $Cache:Config.Theme.LoginButtonBGColor -LoginButtonFontColor $Cache:Config.Theme.LoginButtonFontColor -WelcomeText $Cache:Config.Theme.WelcomeText -LoadingText $Cache:Config.Theme.LoginLoadingText
    }
$Dashboard = New-UDDashboard -Title $Cache:Config.Theme.DashboardTitle -Pages $Pages -EndpointInitialization $EndpointInit -LoginPage $LoginPage -Navigation $Navigation -NavbarLinks $NavBarLinks -NavBarLogo $NavBarLogo -NavBarColor $Cache:Config.Theme.NavBarColor -Footer $Footer -Theme $DashboardTheme
$null = Start-UDDashboard -Dashboard $Dashboard -Endpoint $Endpoints -Name $Cache:Config.Theme.DashboardName -Port $Cache:Config.Dashboard.HTTPPort -AllowHttpForLogin:$Cache:Config.Dashboard.HTTP -AdminMode:$Cache:Config.Dashboard.AdminMode -Force:$Cache:Config.Dashboard.Force -DisableTelemetry:$Cache:Config.Dashboard.Telemetry -Wait:$Cache:Config.Dashboard.Wait

The variables come from a Powershell Data file and are dynamically loaded from this config file, this all works too.

Thanks

Can you open an issue for this on GitHub? It looks like a bug.

Yes, it seems like a bug. I have installed version 2.8.1 and in this version the Sign Out button is still present. I can also reproduce this by using the 2.8.2 again. I open an issue.

Here is the issue: https://github.com/ironmansoftware/universal-dashboard/issues/1481

1 Like