gcpug / nouhau

Google Cloud Platformのノウハウを共有するRepository
https://gcpug.jp
MIT License
653 stars 23 forks source link

FirestoreでGoogle Groupに所属しているユーザのみを絞りたい #58

Open sinmetal opened 6 years ago

sinmetal commented 6 years ago

WHAT

特定のGoogle Groupに所属しているユーザのみを指定したセキュリティルールをなんとかしたい

WHY

hoge@gcpug.jp に所属している人だけ見えるみたいなことをしたい

sinmetal commented 6 years ago

カスタム認証でがんばる https://github.com/firebase/functions-samples/tree/master/instagram-auth

sinmetal commented 6 years ago

G Suite系のAPI遅かったり、クォータが小さかったりするから、cronでGroupのメンバーを取得して、Firestoreにぶっこんでおいて、exist() で見るとかも1つの手かもしれない