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
Iris GaleanoIris Galeano 

salesforce remember me check box not working using oauth2.0 in a desktop application

Hello! 

I have an application on Electron that uses the electron-oauth-helper library for oauth2. I provide the configuration for the oauth flow and the app displays the salesforce login page successfully. I enter my credentials for the login, select the Remember me checkbox and then login successfully. Later, when I logout and return to the login page my credentials are not saved and I have to write again my username and password. 

Is there a way I can configure maybe the oauth flow in order to have this button working? 

Any help with be appreciated! thank you! 
SwethaSwetha (Salesforce Developers) 
Hi Iris,
Does the option of "Enable caching and autocomplete on login page" help? Per the documentation https://help.salesforce.com/articleView?id=admin_sessions.htm&type=5

"If enabled, after initial login, usernames are auto-filled into the Username field on the login page. If the user selected Remember me on the login page, the username persists after the session expires or the user logs out."

Also see https://www.baeldung.com/spring-security-oauth2-remember-me which suggests usage of OAuth 2 Refresh Token.

Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you
Iris GaleanoIris Galeano
Hello Swetha! 

Thank you very much for your reply. I had read both articles. In the first case I already had the  "Enable caching and autocomplete on login page" selected but still it does not work. 

In the second article, they suggest how to implement the remember me button to get a new access token using the refresh token, in my case I don't have problems doing this, I am able to refresh de user access token when I need. My problem is when the user goes to the login page, if he selected the Remember me option, the usernames have to be auto-filled into the Username field on the login page, but this does not happen. I am using the electron-oauth-helper library for oauth2, I don't have the control over the login page, at least I think so. In the electron-oauth-helper documentation (https://github.com/mironal/electron-oauth-helper ) I don't find any description about this, so I don't know if it is a problem related with the library, or maybe the Electron framework or my Salesforce settings.