Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTTP Error: 401, Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential

First of all i am trying to learn using Firebase functions. So i had installed node.js a long time ago and today i tried to use a notification function on firebase.So when i used firebase init in command prompt it asked me to proceed and then asked me what do i want to do so i chose functions there. So far everything was fine but then it stopped suddenly and showed me

Error: HTTP Error: 401, Request had invalid authentication credentials. Expected 
OAuth 2 access token, login cookie or other valid authentication credential. See 
https://developers.google.com/identity/sign-in/web/devconsole-project.

i tried searching for it online but couldn't find any solution so I came here. Any help would be appreciated.i am confused as what is the problem here.

like image 910
Hemu Sharma Avatar asked Jan 29 '19 20:01

Hemu Sharma


2 Answers

face the same problem solved by logging out then login again

firebase logout 

then

firebase login
like image 160
Mohammad Shraim Avatar answered Oct 22 '22 01:10

Mohammad Shraim


Note if you are using wsl or wsl2 then make sure your system clock is in sync: https://github.com/microsoft/WSL/issues/4245

like image 2
Yogi Valani Avatar answered Oct 22 '22 03:10

Yogi Valani