Google accounts are a part of your personal and professional lives, especially with single sign-on (SSO) that helps you log into almost any platform or app with one click. Sometimes, you may need to allow a friend or family member access to your computer. When this happens, you may wonder how to log out of Gmail automatically.
Google doesn’t have a built-in feature that allows you to log out of Google accounts automatically. So, you’ll need to use one or more of the following methods to log out of all your Google accounts.
Use Two-Step Verification
Say you’ve got a PC at work where you’ve logged into your Gmail. You’ve called in sick and are resting at home, but your colleague needs to use your PC to access some documents. You realize that you haven’t signed out of your Gmail on your work PC.
That’s a problem, right? Well, it wouldn’t be if you had enabled two-factor authentication (or two-step verification) on your Gmail. Not only does two-factor authentication require manual login every time, but it also adds an extra layer of security to your Google account.
- Go to your Google account.
- Select Security from the top navigation panel.
- Scroll down and look for 2-Step Verification.
- You’ll now see a screen from where you can begin to set up two-step verification. Select GET STARTED.
- Log into your Gmail, and you’ll now see a screen where you’ll need to enter your phone number for verification. Enter your phone number, select whether you’d like to verify with a text or phone call, and select NEXT.
- Enter the code you received on your phone in the next step and select NEXT. Google will prompt you to turn on two-step verification. Select TURN ON.
- You’ve now set up two-step verification. If you choose, you can add additional verification steps, including verification using the Google Authenticator app.
Once you’ve set up two-step verification, you’ll automatically be logged out of your Google account every time you close the tab.
This does add an extra step for you whenever you want to log in. Still, you can make the process a tad easier by saving your username and password into your device’s browser so you can use autofill to insert login credentials quickly.
You don’t need to worry about others accessing your Google account using autofill because they’ll still need the verification code from you to log in.
Use Private Browsing
You could use private browsing (also called Incognito Mode in Chrome) to log yourself out automatically after each session. Also, have you set up Google Chrome Browser sync? Now is a good time to turn the sync off because this will sync any information you put into your browser, including passwords.
When you use private browsing, none of the information is saved. If you log into a Google account using private browsing, closing the browser window will automatically log you out, so you’ll need to log in again the next time you use the browser. You can even create a shortcut to directly launch the browser in private browsing mode.
Here’s how you can use private browsing in Chrome, Firefox, and Edge:
- Chrome and Edge: Press Ctrl + Shift + N.
- Firefox: Press Ctrl + Shift + P.
Clear Cookies When Window is Closed
Another way to log out of Google accounts automatically is by setting your browser to delete cookies automatically. Here’s how you can change settings on Chrome to delete cookies automatically:
- Select the ellipsis at the top and select Settings.
- Select Privacy and security from the left pane, and then Cookies and other site data from the right pane.
- Scroll down to the Customized behaviors section and select Add beside the text Always clear cookies when windows are closed.
- Add this as a site:
When you’re done, select Add. This will add all google subdomains to the list, such as mail.google.com, calendar.google.com, etc.
- You’ll be logged out of all Google accounts when you close the browser window.
If you’re in a situation where you haven’t set up two-step verification or automatic clearing of cookies, you could remove the device remotely from your Google account.
- Go to Your devices page on Google.
- Find the device you want to remove and select More details.
- Select Sign out on the next screen and confirm the Sign out when prompted.
That’s it; you will now be logged out of your Google account.
You’re Now in Control
You can now control access to your Google account even if you use multiple devices and even on devices that you don’t have physical access to. It’s probably best to use two-step verification since you also add an extra layer of security. Still, you could use the other methods if you like to log in quickly without going through the verification steps.