I recently enabled Identity Platform from the Firebase interface for firebase authentication (primary for user logs). Everything worked fine for a few hours. Went to bed. Woke up. Starting working again, and now I receive this error:
{
"error": "invalid_grant",
"error_description": "reauth related error (invalid_rapt)",
"error_uri": "https://support.google.com/a/answer/9368756",
"error_subtype": "invalid_rapt"
}
I visited the error_uri, and the error suggests that I enable a session length for the google apps domain. I don't have direct access to do this, but have a request in to the administrator of the google app domain to do so.
That said, this is concerning, as the bit of code it's failing on is leveraging the standard firebase admin service account in a firebase function (google cloud function), not a traditional user. I would think this error wouldn't be triggered by a service account. I should note for clarity, I am using a local functions emulator, but the cloud (not-local) firestore, which all was working for a few hours before going to bed. The code that triggers the error looks like this:
const admin = require("firebase-admin");
admin.initializeApp();
const myData = await admin
.firestore()
.doc(`/path/to/needed/data`)
.get()
Perhaps this is a simple domain-wide requirement when identity platform was enabled and when that setting is enabled, everything will work as expected. But I suspect I will need to configure a policy or something to allow this service account to satisfy that requirement.
I did find one post that looked similar and tried their solution, but it did not work for me.
Not sure where to go from here, and would love any advice on how to resolve. Not many results come up for this error related to firebase, only big query.
Thank you in advance for your help.