You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using VueFire with Nuxt. I have some pages that anyone can access (login, sign, password reset, etc) and also some pages only users with an account should access (dashboard, settings, etc).
So as per the VueFire Nuxt docs it says I need to turn on the Session Cookie feature to persist the auth between page refreshes.
This needs to be done by:
Activating the Service Account Credentials API in GCP (complete)
Adding sessionCookie: true to nuxt.config.ts (complete)
Adding a "specific role" to your Firebase service account. The VueFire docs are unclear here. Exactly which role should I add? I clicked the provided link and the Firebase docs talk about using the "Service Account Token Creator" role which I hope was correct.
But even after doing all of this I still get this console error:
I got rid of that console error. I had a restricted Firebase Browser API Key. So I had to add securetoken.googleapis.com (Secure Token API) to that list of allowed APIs, then the console error went away.
But now I have another problem...
App Check with Session Cookie throws an error. It works fine when I remove sessionCookie: true so this error is definitely related to Session Cookie.
I think the problem stems from the fact the server is trying to do an App Check but the debug token I am using is in the browser not the server. Here is the error I am seeing on screen (not in the console) when sessionCookie: true is enabled:
Also if the Firebase Browser Key has a website restriction (http://localhost:3000 and http://localhost:3000) I get this error on the screen (not in the console). Again, I think it's because the request is coming from the server and not the browser:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am using VueFire with Nuxt. I have some pages that anyone can access (login, sign, password reset, etc) and also some pages only users with an account should access (dashboard, settings, etc).
So as per the VueFire Nuxt docs it says I need to turn on the Session Cookie feature to persist the auth between page refreshes.
This needs to be done by:
sessionCookie: true
tonuxt.config.ts
(complete)But even after doing all of this I still get this console error:
FirebaseError: Firebase: Error (auth/requests-to-this-api-securetoken.googleapis.com-method-google.identity.securetoken.v1.securetoken.granttoken-are-blocked.).
Any ideas what I'm doing wrong?
UPDATE:
I got rid of that console error. I had a restricted Firebase Browser API Key. So I had to add securetoken.googleapis.com (Secure Token API) to that list of allowed APIs, then the console error went away.
But now I have another problem...
App Check with Session Cookie throws an error. It works fine when I remove
sessionCookie: true
so this error is definitely related to Session Cookie.I think the problem stems from the fact the server is trying to do an App Check but the debug token I am using is in the browser not the server. Here is the error I am seeing on screen (not in the console) when
sessionCookie: true
is enabled:Also if the Firebase Browser Key has a website restriction (
http://localhost:3000
andhttp://localhost:3000
) I get this error on the screen (not in the console). Again, I think it's because the request is coming from the server and not the browser:This is my
runtimeConfig
andvuefire
config objects innuxt.config.ts
:Beta Was this translation helpful? Give feedback.
All reactions