Is there a way to use Firebase.ServerValue.TIMESTAMP or new Date().getTime() in firebase security rules to check against a timestamp value?

有帮助吗?

解决方案

You're looking for the 'now' variable. E.g.:

// Ensure data being written is in the future.
".write": "newData.val() >= now"
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top