Reload page on tab change

Ya normally It would kick me out/disconnect after the timeout period, this now keeps the connection alive.

I know there could be some different implementations of this… There are definitely things I can do with this component. I just tried redirecting back to the login page, but since I use OpenId it would redirect back to the Microsoft login page, but for some reason, if you stay in that Microsoft login page for too long the login times out, and when you are redirected back to UD the page cannot be displayed.

I use the Access Token from Microsoft/OpenId to connect to other Azure/CSP APIs, but this token sometimes expires before UD session expires, so I have this in a catch

Invoke-UDLogout -Url ($Request.Headers["Origin"].ToString())

function Invoke-UDLogout {
    param ($Url)
    Invoke-UDJavaScript -JavaScript 'var Http = new XMLHttpRequest();
    var url = "/signout";
    Http.open("GET", url);
    Http.send()'
    Start-Sleep 1
    Invoke-UDRedirect -Url $Url
}

which works really well - Thinking out I can use this with your component.

I hope you and everyone are staying sane and safe.

2 Likes