【发布时间】:2021-03-09 09:01:35
【问题描述】:
Aguar Fire 带有一套自己的防护装置 (AngularFireAuthGuard):
https://github.com/angular/angularfire/blob/master/docs/auth/router-guards.md
但是,在使用它们时,我无法再存储重定向 URL。在 Auth Guard 中存储重定向 url 非常方便,因为您可以简单地将这个值用于任何身份验证状态观察者,自动将您路由到上一页。
使用保护存储重定向 url 也是预期的 Angular 方式,请参阅 https://angular.io/guide/router-tutorial-toh#milestone-5-route-guards 章节“使用 AuthGuard 进行身份验证”。
那么我如何自定义/丰富 Fire Auth 防护的逻辑以简单地存储重定向 url?
【问题讨论】:
标签: angular firebase-authentication angular11