【发布时间】:2019-08-15 07:01:27
【问题描述】:
在Firestore docs 中,一种推荐的编写安全规则的方法是
service cloud.firestore {
match /databases/{database}/documents {
match /users/{userId} {
allow read, update, delete: if request.auth.uid == userId;
allow create: if request.auth.uid != null;
}
}
}
但是,当我创建用户时,用户 ID 与 auth.uid 不同(两者都是随机字符串,但完全随机)。
创建新用户时如何使它们自动匹配?
【问题讨论】:
标签: ios swift firebase google-cloud-firestore firebase-security