I can deploy as a redirect to a user that has lost its session and want to enter your login details?
I'm afraid I don't understand your question. We need more information about what you're trying to do and why in order to help you.
Thank you very much for answering, the problem is this, if a user finished his session or clean your browser history as valid to redirect to home, what snippet, can use?
I'm still not sure I'm understanding you, but there is no existing snippet I know of that will detect when a user has lost the session. The only thing I can think of is something like this in a snippet in your all your templates:
<?php
if (! $modx->user->hasSessionContext($modx->context->get('key'))) {
/* replace 12 with the ID of your login page" */
$url = $modx->makeUrl(12, "", "", "full");
$modx->sendRedirect($url);
}
When a user visits a page and is not logged in or has lost their session, they will be sent to the Login page.