function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Lakshya KanchanLakshya Kanchan 

SFDX CLI logout command impact

Hi

I have a business requirement wherein I have the scenario to logout of the org using SFDX CLI.

I want to understand 2 scenarios:

1. What will happen if we dont use the sfdx logout command when working with SFDX CLI.
2. What is the session timeout period if we dont run the sfdx logout command in cmd and close the cmd window.

Regards,
Lakshya
SubratSubrat (Salesforce Developers) 
Hello Lakshya ,

If you do not use the sfdx logout command after working with SFDX CLI, your session remains active, and you can continue to use the CLI without the need for authentication. However, it is recommended to log out to ensure the security of your credentials, especially if you are working on a shared machine or network.

 If you close the command window without logging out, your session will remain active until it times out or until you log out using the sfdx logout command. 

To change session timeout period you can refer this article -> https://www.tenable.com/audits/items/CIS_Check_Point_Firewall_Level_1_v1.1.0.audit:119d9daf9ef9c3ed2317e82b7d52fca7


Hope it helps !
Thank you.