core-bundle/src/Security/Authentication/FrontendPreviewAuthenticator.php
public function removeFrontendAuthentication(): bool
    {
        if (!$this->session->isStarted() || !$this->session->has(FrontendUser::SECURITY_SESSION_KEY)) {
            return false;
        }

        $this->session->remove(FrontendUser::SECURITY_SESSION_KEY);

        return true;
    }
public function removeFrontendAuthentication(): bool
    {
        if (!$this->session->isStarted() || !$this->session->has(FrontendUser::SECURITY_SESSION_KEY)) {
            return false;
        }

        $this->session->remove(FrontendUser::SECURITY_SESSION_KEY);

        return true;
    }
Removes a front end authentication from the session.