I have several Google accounts set up in System Preferences > Internet Accounts on macOS 10.14.5. The Google accounts have two-factor authentication. I'm able to log in the accounts via a Safari window, and then use them with Mail and Calendar without problems.

Until my Mac sleeps. On wake, it demands that I log the accounts in again, requiring several rounds of password and two-factor authentication.

I have tried using Google's app-specific passwords, but they aren't accepted at the login prompt that pops up from System Preferences > Internet Accounts.

Is there a method to keep macOS logged in indefinitely?

Note: This does not appear to have the same cause as Can't login with Google using Internet Accounts — the answers there did not solve the problem for me.

  • 1
    Possible duplicate of Can't login with Google using Internet Accounts – fsb Jun 5 at 18:13
  • That problem doesn't have the same symptoms but I'll try the various solutions mentioned there and make an edit. – rptb1 Jun 5 at 18:20
  • Unfortunately, none of those solutions affect this problem in my case, so this isn't obviously a duplicate. – rptb1 Jul 11 at 19:17
  • 1
    Ok, it would be good to edit your question to indicate you tried the solutions in that question and they didn't work. That way everyone will know it's not a dup (comments can be deleted). – fsb Jul 11 at 20:52
  • Mail app loses username-password for google apps account has/had an bounty with no answers yet. @fsb ping. – ankii Jul 12 at 20:18

If, like me, you have that problem, you might want to check that googleapis.com and other google domains aren't blocked by a firewall (if you are using little snitch, double check that accountsd can access google apis.

Once I allowed accountsd outgoing internet access to googleapis.com, as shown in the attached screenshot, the mac no longer complained when woken up from sleep that I needed to enter my password for my GSuite account.like that screenshot

If that doesn't work, you can maybe look for a DNS server or a host file that would block the googleapis aswell.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .