ytanaka44 / react-todoapp

0 stars 0 forks source link

認証機能の追加 #20

Closed ytanaka44 closed 8 months ago

ytanaka44 commented 8 months ago

背景

ログイン・ログアウトができるようにする

ytanaka44 commented 8 months ago

Firebaseを使ってみる

ytanaka44 commented 8 months ago
ytanaka44 commented 8 months ago

Cloud Firestore セキュリティ ルール

非推奨例1(ログインしているすべてのユーザーが、データベース全体に対して読み取りと書き込みのアクセス権を持っている。)

service cloud.firestore {
  match /databases/{database}/documents {
    match /some_collection/{document} {
      allow read, write: if request.auth != null;
    }
  }
}

非推奨例2(すべてのユーザーに対する読み取りと書き込みのアクセス権)

// Allow read/write access to all users under any conditions
// Warning: **NEVER** use this rule set in production; it allows
// anyone to overwrite your entire database.

service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write: if true;
    }
  }
}
ytanaka44 commented 8 months ago

セキュリティルールの書き方参考