Google-chrome – How to turn off automatic login to Gmail from the machine

google-chrome

When I turn my computer on and open Chrome, I type gmail.com and am automatically logged into my Gmail account. I want to turn this off so that if I go to gmail.com after turning on the computer, I will be prompted to enter a password, regardless of whether or not I logged out before I turned it off.

I have been googling this all morning. I have already been to settings through the Google Accounts home page and removed all saved passwords, but it still happens.

Can anyone offer any help as to how to turn this off?

Best Answer

I have the same desire to not have Google automatically log me in. The only way around this is to have your browser clear its cookies on close.

Following that route, instead of clearing all cookies, I have created a python script that targets the Google Account cookies and use Windows Task Scheduler to run on Windows Log Off. Also, please note that you may need to update your version of sqlite that python references.

For Firefox (replace <YOUR USER NAME> with your user name and you will have to follow the path to get <YOUR PROFILE ID>):

import sqlite3

CookiesDb = r'C:\Users\<YOUR USER NAME>\AppData\Roaming\Mozilla\Firefox\Profiles\<YOUR PROFILE ID>.default\cookies.sqlite'

db=sqlite3.connect(CookiesDb)
db.execute("DELETE FROM moz_cookies WHERE name IN ('SSID','SAPISID') AND Host 
LIKE '%google%'")
db.execute("DELETE FROM moz_cookies WHERE name = 'ACCOUNT_CHOOSER' AND Host = 
'accounts.google.com'")
db.commit()
db.close()

For Google Chrome (replace <YOUR USER NAME> with your user name):

import sqlite3

CookiesDb = r'C:\Users\<YOUR USER NAME>\AppData\Local\Google\Chrome\User Data\Default\cookies'

db=sqlite3.connect(CookiesDb)
db.execute("DELETE FROM cookies WHERE name IN ('SSID','SAPISID') AND Host_key LIKE '%google%'")
db.execute("DELETE FROM cookies WHERE name = 'ACCOUNT_CHOOSER' AND Host = 'accounts.google.com'")
db.commit()
db.close()