-
Notifications
You must be signed in to change notification settings - Fork 2.8k
V16: keepUserLoggedIn has no effect #20123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…e and simply try to refresh the token when the worker makes an attempt to log out the user
… the 'current-user' package previously, it was not exported, so is not a breaking change
…ackage to avoid circular dependencies (and because it naturally belongs there)
On the get-go, this does not quite work because we are not allowed to import from a package module (current-user) into a core module (auth). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes issue #18220 by implementing proper support for the "keepUserLoggedIn" user configuration setting. When this setting is enabled, the system will attempt to validate/refresh the authentication token instead of logging the user out when the session times out.
- Adds token validation functionality to the auth session timeout controller
- Integrates user configuration observation to respect the "keepUserLoggedIn" setting
- Implements early return logic to prevent logout when keepUserLoggedIn is enabled
Comments suppressed due to low confidence (1)
src/Umbraco.Web.UI.Client/src/packages/core/auth/controllers/auth-session-timeout.controller.ts:1
- The method
#tryValidateToken()
is called on line 34 but is not defined in this class. This will result in a runtime error when keepUserLoggedIn is enabled and the session times out.
import type { UmbAuthFlow } from '../auth-flow.js';
Description
Fixes #18220
Observes the current-user config for the 'keepUserLoggedIn' value and tries to refresh the token when the worker attempts to log out the user
Session Timeout Logic Improvements:
UmbAuthSessionTimeoutController
now observes the user's "keepUserLoggedIn" configuration and, if enabled, will attempt to validate the token instead of logging the user out when the session times out. [1] [2]Integration with User Configuration:
UmbCurrentUserConfigRepository
to the session timeout controller to access and observe the user's configuration, specifically the "keepUserLoggedIn" setting. [1] [2]