HTTP Error: 401 while setting up firebase cloud functions for android project
Use firebase login --reauth
, that happened to me because an old FIREBASE_TOKEN
was present while trying to exec firebase init
I solved it by manually deleting the FIREBASE_TOKEN
from my environment variables, THEN issued a firebase login --reauth
.
Note: I tried to re-authenticate without deleting the Firebase token first, but didn't work for me.
I solved the problem!
you need to logout firebase logout
then log-in firebase login
again or just refresh the token with firebase login --reauth
it seems that the expiry time of Firebase auth token is limited to max 1Hr