[Auth Guard - BUG] canActivate auth guard causes blank screen after cache clear with multiple tabs opens.
維護者通常 3 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 38/100
- Issue 類型
- 缺陷
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- angular, firebase, typescript
研究方向
從 issue 中描述的最小 AngularFire 驗證設定開始,使用帶有 redirectLoggedInTo 和 redirectUnauthorizedTo 的 canActivate guard。使用兩個分頁重現此行為,在其中一個分頁中清除快取並重新整理它。完成標準是:重新整理後的分頁能夠正常載入,而不是顯示空白畫面,同時另一個分頁保持開啟狀態。
由索引模型根據 Issue 內容生成。
描述
If using the canActivate auth guard (with spread syntax), If you have more than 1 tab open of the same app, and then you clear the cache by using the browser in one of the tabs, and try to refresh, it causes a blank screen, which resolves after you close the other open tab.
steps to reproduce:
versions:
"@angular/common": "^20.3.0",
"@angular/compiler": "^20.3.0",
"@angular/core": "^20.3.0",
"@angular/fire": "^20.0.1",
"@angular/forms": "^20.3.0",
"@angular/platform-browser": "^20.3.0",
"@angular/router": "^20.3.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.15.0"
steps to reproduce:
- Create new project
- install angular fire
- setup authentication and firebase project
- utilize the ...canActivate auth guard like below.
- open two tabs of the same page.
- in one of them, clear the cache (by using the button close to the url in chrome for ex)
- refresh
- blank screen.
- verify that if you close the second tab, then the first one loads correctly.
const redirectTeste1 = () => redirectLoggedInTo('test2');
const redirectTeste2 = () => redirectUnauthorizedTo('teste1');
export const routes: Routes = [
{ path: '', redirectTo: 'teste1', pathMatch: 'full' },
{
path: 'teste1',
component: Test1,
...canActivate(redirectTeste1),
},
{
path: 'teste2',
component: Test2,
...canActivate(redirectTeste2),
},
];
lmk if this is somehow a user error, but with such a barebones configuration I think is a legitimate bug.
- 主要語言
- TypeScript
- 星號
- 7.8k
- 分支
- 2.2k
- 平均合併
- 2 天 1 小時
- 30 天內合併 PR
- 17
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
angular/angularfire 的其他 Issue
-
docs: the App Check guide does not cover server-side rendering可能已有人在做 @armando-navarro 於 12 天前認領。 未關閉comp: app-check comp: docs comp: ssr type: chore version: current (v17+)
難度 2/5 1-3 小時 新手友好度 88/100
angular/angularfire#3774 ·
維護者通常 3 天內回覆
-
Use `TransferState` to hand server-rendered Firestore data to the browser, instead of reading every document twice可能重新可做 @armando-navarro 於 39 天前認領,目前沒有進行中的 PR。 未關閉comp: firestore comp: ssr priority: P0 (critical) type: feature version: current (v17+)
angular/angularfire#3757 · 已指派 1 人 ·
維護者通常 3 天內回覆
-
Six `firebase` entry points have no `@angular/fire` equivalent, so their exports are unreachable可能重新可做 @armando-navarro 於 39 天前認領,目前沒有進行中的 PR。 未關閉comp: core type: feature
angular/angularfire#3755 · 已指派 1 人 ·
維護者通常 3 天內回覆
-
難度 4/5 3-5 天 新手友好度 35/100
angular/angularfire#3737 · 2 則留言 · 24 個 reaction ·
維護者通常 3 天內回覆
-
難度 4/5 3-5 天 新手友好度 52/100
angular/angularfire#3715 ·
維護者通常 3 天內回覆
查看 angular/angularfire 的全部 Issue
相似的 Issue
-
bug confirmed perf
難度 2/5 1-3 小時 新手友好度 72/100
videojs/video.js#9400 · 1 則留言 ·
維護者通常 1 天內回覆
-
good first issue hacktoberfest
難度 2/5 半天 新手友好度 70/100
HelpCode-ai/anythingmcp#996 ·
維護者通常 1 天內回覆
-
check:passed streams:add
難度 1/5 1-3 小時 新手友好度 72/100
維護者通常 2 天內回覆
-
beta technical-medium ui
難度 2/5 1-3 小時 新手友好度 62/100
walletbeat/walletbeat#1625 ·
維護者通常 1 天內回覆
-
[Good First Issue]: Add unit tests for NetworkVersionInfo可能已有人在做 @attilayener 今天認領。 未關閉Good First Issue hacktoberfest
難度 2/5 1-3 小時 新手友好度 85/100
hiero-ledger/hiero-sdk-js#4489 ·
維護者通常 1 天內回覆