Support

Akeeba Backup for Joomla!

#43521 Different Google Drive tokens

Posted in ‘Akeeba Backup for Joomla!’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
6.2.0
PHP version
8.4.27
Akeeba Backup version
10.5.0

Latest post by nicholas on Wednesday, 18 November 2026 09:06 CST

trogladyte

Until today, I have used the same 2 tokens for my Google Drive uploads. Every new site, same tokens, same result (successful upload to Google Drive).

Even yesterday, this particular site was using the old tokens. Today, I had to reauthorize, but every other site I've tried is still working on the old tokens. So, I have one site out of 70 that has different tokens.

Has anyone else seen this?

nicholas
Akeeba Staff
Manager

I am surprised that your tokens worked until now. About a decade ago Google Drive made a change in how their OAuth2 renewal tokens work. They might returns just a new access token, or a new access token and a renew token. There's been a warning in the documentation not to use the same refresh token across multiple backup profiles on the same or different installations of Akeeba Backup for this reason.

I speculate that you had a really, really old refresh token predating this change and for whatever reason it was only ever minting new access tokens, without the refresh token itself being reissued or expiring. This is exactly why Google made this change. A refresh token like that being stolen would give the attacker forever access to your data. Having the refresh token reissued means that a stolen refresh token would either get invalidated for the attacker (locking them out of your data), or them using the refresh token would invalidate yours which would result in a very visible inability to access your data, prompting you to investigate what's going on.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

trogladyte

Thanks, Nicholas, for the explanation. Now that I'm looking at more of my sites, I see that they now all show the "Start Authentication" buttons if I go into the profiles. Now, they may have been there for some time, although I don't think so as I've been backing up old sites and adding new ones with the old tokens until 2 days ago.

Interestingly, the tokens I got from reauthenticating the first site (which triggered my ticket) worked fine yesterday. Today they failed. I did a 2nd reauthentication and got 2 similar but different tokens, and they worked. I'm working on changing all sites over to today's tokens. Very odd that a brand new one from yesterday failed today (on the same site).

Cheers!

nicholas
Akeeba Staff
Manager

Start Authentication (formerly "Authentication - Step 1") is always shown. We do not check the credentials when rendering the page. Besides, it may be the case that you want to retry connecting, or connect with a different account.

Interestingly, the tokens I got from reauthenticating the first site (which triggered my ticket) worked fine yesterday. Today they failed.

The access token is ephemeral; pay no attention to it. The refresh token is the semi-permanent one. When there is no access token, or the existing access token no longer authenticates, your site contacts Google Drive through the mediator (by default our site) to exchange the refresh token with a new access token. Sometimes, you also get a new refresh token, in which case it is persisted to the database.

If the exchange does NOT return a new refresh token, the previously used refresh token can be reused. As I said, it used to be the case that this refresh token would never be rotated on Google's side which is exactly what allowed you to reuse the same refresh token across profiles and sites.

If the exchange DOES return a new refresh token, the previously used refresh token is "burnt". It can no longer be used by anyone or anything. Not the same backup profile, not a different backup profile, not a different site.

Since you were trying to reuse the same refresh token across profiles or sites, the first profile / site which used it in an exchange which resulted in a rotation won; it kept the new refresh token and it's working fine. Everything else kept the old, and now "burnt", refresh token which is no longer valid – hence the failure.

Again: every site, and every profile on each site, needs to have its own refresh token.

And here's where it gets weirder.

Google Drive MAY reject an otherwise valid refresh token if it thinks you created "too many", or it was "unused for a while", or for any other reason they deem necessary (think of it as fraud detection). They do not publish those limits and rules, they can change them whenever they want, and they may not even work the same for all accounts.

My experience is that all OAuth2-based consumer-grade storage services (Google Drive, OneDrive, Dropbox, Box) are NOT reliable when you have multiple backup profiles and/or sites. After a handful of backup profiles, you start getting random authentication problems. I have done nothing wrong; you can audit my code and see it follows their documentation to the letter. They decide to just "randomly" burn your refresh tokens, and by "randomly" I mean "it probably triggered some weird fraud detection algorithm". My advice is to use enterprise-grade storage for these use cases. It's not even that expensive. Services like Scaleway, BackBlaze B2, and Wasabi sell very inexpensive storage.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

trogladyte

Again, thanks, Nicholas. Great explanation. I'll have a look at the alternatives. Breaking up with Google (even a little bit) is NEVER a bad thing! :-) I used to useAWS but they got to be a pain as well, hence I moved to GD.

nicholas
Akeeba Staff
Manager

I hear you! I am currently using Scaleway. Came for the better privacy, stayed for the better reliability and lower prices. Breaking up with Big Tech can be a positive experience. Not always, but I'm seeing that more often than not it actually is.

If only Ubuntu Phone hadn't flopped all those years ago...

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!