Firebase Oauth2 - Token has been expired or revoked

Hello there,

Describe the issue/error/question

I have a webhook running, that if fired saves data to firebase “firestore”.
After some days, the access token from firestore expires and I have to go to the credentials and sign it again.

Is there any other way I can grant access to firebase? I saw in another question, that you already implemented Service Account authorization, but I can’t find the option in the n8n credentials UI

What is the error message (if any)?

{“body”:{“error”:“invalid_grant”,“error_description”:“Token has been expired or revoked.”},“code”:“EAUTH”}

Information on your n8n setup

  • n8n version:
  • **Database you’re using (default: SQLite): default
  • **Running n8n with the execution process [own(default), main]: default
  • **Running n8n via [Docker, npm, n8n.cloud, desktop app]:Docker

Hi @Niklas_Mensan, welcome to the community! Service account authentication is only available for some Google services, with Firestore unfortunately not being one of them. You can find the full list here: Google - n8n Documentation

On the actual problem, does this happen after exactly seven days by any chance? If so, you might need to publish the OAuth2 client you have registered with Google, as for test users the authentication will expire after seven days as per Google’s documentation:

Authorizations by a test user will expire seven days from the time of consent.

From testing this myself it seems Google doesn’t enforce this if the authenticating user is identical with the GCP project owner, but this might change at any time.

To avoid running into this you would need to publish your application or consider using a Google Workspace account which would allow you to create an Interal OAuth client only accessible to users within your organization.

Hi,

thanks for the advice. I will publish the OAuth client.

1 Like

@MutedJam I realize this is an older post from last year, but I am seeing this issue here too. This is not a service account but with my workspace account. I have tried publishing both in production and internal for the oauth and it still kicks me out after a little while.

Have you seen any issues lately with this?

Thanks

It’s very strange…