polymer - Detect Firebase Authorization Failure With Polymerfire -
what best practice detect when authorization fails due firebase security rules. example if security rules in firebase database not allow current logged in user below access "/path/to/data" how can detected?
<firebase-document id="document" app-name="notes" path="/path/to/data" data="{{data}}"> </firebase-document>
as of polymerfire 0.9.5
document , query elements emit "error" event when read access denied:
<template> <firebase-document id="document" app-name="notes" path="/path/to/data" data="{{data}}" on-error="handleerror"> </firebase-document> </template> <script> polymer({ handleerror: function(e, err) { // handle error } }); </script>
Comments
Post a Comment