【发布时间】:2017-12-18 22:11:14
【问题描述】:
问题:目前当我在应用程序中注销时,浏览器控制台中记录了以下错误,
core.es5.js:1020 ERROR Error: permission_denied at /all-posts: Client doesn't have permission to access the desired data.
at Object.webpackJsonp.../../../../@firebase/database/dist/cjs/src/core/util/util.js.exports.errorForServerCode (util.js:513)
at onComplete (SyncTree.js:538)
at Object.onComplete (Repo.js:115)
at PersistentConnection.webpackJsonp.../../../../@firebase/database/dist/cjs/src/core/PersistentConnection.js.PersistentConnection.onListenRevoked_ (PersistentConnection.js:692)
at PersistentConnection.webpackJsonp.../../../../@firebase/database/dist/cjs/src/core/PersistentConnection.js.PersistentConnection.onDataPush_ (PersistentConnection.js:464)
at PersistentConnection.webpackJsonp.../../../../@firebase/database/dist/cjs/src/core/PersistentConnection.js.PersistentConnection.onDataMessage_ (PersistentConnection.js:452)
at Connection.webpackJsonp.../../../../@firebase/database/dist/cjs/src/realtime/Connection.js.Connection.onDataMessage_ (Connection.js:262)
at Connection.webpackJsonp.../../../../@firebase/database/dist/cjs/src/realtime/Connection.js.Connection.onPrimaryMessageReceived_ (Connection.js:256)
at WebSocketConnection.onMessage (Connection.js:157)
at WebSocketConnection.webpackJsonp.../../../../@firebase/database/dist/cjs/src/realtime/WebSocketConnection.js.WebSocketConnection.appendFrame_ (WebSocketConnection.js:197)
控制台中还记录了其他与权限相关的类似错误,这仅用于示例。
Here is snapshot.
我想弄清楚是否有办法防止以编程方式在浏览器控制台中记录这些类型的错误。
这是我当前的注销代码:
logout() {
this.afAuth.auth.signOut()
.then( () => {
this.router.navigate(['login']);
});
}
【问题讨论】:
标签: angular firebase-authentication