ironmansoftware / powershell-universal

Issue tracker for PowerShell Universal
https://powershelluniversal.com
35 stars 3 forks source link

The Logon auth page should check for an updated token cookie periodically and automatically redirect #1194

Closed x86Since8088 closed 1 year ago

x86Since8088 commented 2 years ago

Steps to Reproduce

Have multiple tabs open to a PowerShell Universal server. Wait for authentication timeout or restore browser session. Observer multiple tabs on the /login page. Authenticate on one

The remining /Logon pages do not redirect automatically to their ReturnUrl= location even though there is now a good token.

Expected behavior

In most modern web applications, authentication pages will check for an existing good authentication token and automatically redirect.  This behavior is for when reauthentication happens on one browser tab and then the user selects a different tab containing that is also waiting for authentication.  The user shoudl not have to edit the url and remove "login?ReturnUrl=".

Actual behavior

The remining /Logon pages do not redirect automatically to their ReturnUrl= location even though there is now a good token.

Environment data

{ "Name": "2368235129/PowerShellUniversal.3.0.0-beta7.msi", "Url": "https://imsreleases.blob.core.windows.net/universal-nightly/2368235129/PowerShellUniversal.3.0.0-beta7.msi", "LastModified": { "value": "\/Date(1653266725000)\/", "DisplayHint": 2, "DateTime": "Sunday, May 22, 2022 7:45:25 PM" } }

Visuals

No response

Omzig commented 1 year ago

can we make the time the token is valid a setting?

adamdriscoll commented 1 year ago

The sessionTimeout setting in appsettings.json controls this.