0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

firebaseのセキュリティルールを変更しないといけないっぽい

Posted at

どうやらFirebaseのセキュリティルールを変える必要があるみたい。

開発段階ではテストモードで開発していることが多いそうで......

自分もそうしてました!

何もしていないと初めて開発してから1ヶ月経っちゃうとなんかエラーが起きてしまいます!
スクリーンショット 2024-09-25 22.42.23.png
                ↑エラー↑

    こうなってるとfirebaseへの接続エラーが起きちゃいます!

           これは開発中では厄介ですよね

                     これを回避するためには

スクリーンショット 2024-09-25 23.24.54.png

1.まずはプロジェクトにアクセスする 

スクリーンショット 2024-09-25 23.25.06.png

2.ルールをタップ

スクリーンショット 2024-09-25 23.25.44.png

3 セキュリティーコードを変える

service cloud.firestore {
match /databases/{database}/documents {

// This rule allows anyone with your Firestore database reference to view, edit,
// and delete all data in your Firestore database. It is useful for getting
// started, but it is configured to expire after 30 days because it
// leaves your app open to attackers. At that time, all client
// requests to your Firestore database will be denied.
//
// Make sure to write security rules for your app before that time, or else
// all client requests to your Firestore database will be denied until you Update
// your rules
match /{document=**} {
  allow read, write: if request.time < timestamp.date(2024, 9, 24);
}

}
}

ここのdateの部分の値を変える必要があります!

この報告をしているブログがなかったので書いてみました

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?