1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

firebase deploy で"HTTP Error: 401, Request had invalid authentication credentials."が出る

Posted at

はじめに

Next.js×TypeScriptで作成したプロジェクトをfirebase deploy したところ、*"HTTP Error: 401, Request had invalid authentication credentials."のエラーが出たので解決方法をまとめます。

問題

今回の401エラーは、Firebaseのデプロイ時に認証エラーが発生していることを指しています。
私の場合は、すでにGoogle Cloudで権限の設定をしている+ログインもしている にもかかわらず、このようなエラーが出ました。

解決方法

下記のコマンドで再ログインをすると解決しました。

firebase login --reauth

おわりに

Reactプロジェクトだとこのような再ログインを求められることはなかったのですが、Next.jsのプロジェクトでは何回か引っかかります。謎です。

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?