如何在 Firebase 安全规则中使用 auth.phoneNumber?
How to use auth.phoneNumber in Firebase security rules?
如何在 Firebase 安全规则中使用 auth.phoneNumber
,例如
auth.phoneNumber == newDatat.phoneNumber
要么
auth.provider == phoneNumber
来自reference docs for the security rules:
auth.token
A variable containing the contents of the Firebase Auth ID token.
The token contains some or all of the following keys:
...
phone_number
The phone number associated with the account, if present.
所以这应该导致 auth.token.phone_number
如何在 Firebase 安全规则中使用 auth.phoneNumber
,例如
auth.phoneNumber == newDatat.phoneNumber
要么
auth.provider == phoneNumber
来自reference docs for the security rules:
auth.token
A variable containing the contents of the Firebase Auth ID token.
The token contains some or all of the following keys:
...
phone_number
The phone number associated with the account, if present.
所以这应该导致 auth.token.phone_number