angular / angular/angularfire

getRedirectResult() always returns null (AF7+FB9)

未關閉
#3,208 9 則留言 7 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
TypeScript
星號
7.8k
分支
2.2k
平均合併
22 小時 28 分鐘
30 天內合併 PR
6

描述

### Version info

**Angular: 13.1.2**

**Firebase: 9.6.3**

**AngularFire: 7.2.0 / 7.3.0**

### How to reproduce these conditions

on my ngInit():

```javascript
getRedirectResult().then(result => { console.log(result)})
```

### Debug output

i always get null.

i tried using the /compat/auth, i get

```javascript
{result : { credentials: null, user: null }}
```
### Expected behavior

results should contain credentials and user.

### Actual behavior

no results at all.
Works properly in AF 6.1.4 + FB 8.2.1. Encountered after upgrade.

onAuthStageChanged() works; it detects the user correctly. Problem is, There is a subscription to auth,state already running on a different module (which i am prohibited to modify). Subscribing to onAuthStageChanged() creates some sort of pseudo-deadlock (sometimes it resolves, sometimes it doesnt).

My temp workaround is to use signInWithPopup() but that disables mobile compatibility.
Tips on overcoming this are highly appreciated. Thank you

貢獻指南

開啟貢獻指南

研究方向

Start with the getRedirectResult() call shown in the reproduction and compare its behavior across AngularFire 7.2.0/7.3.0 with Firebase 9.6.3 versus AngularFire 6.1.4 with Firebase 8.2.1. Check the /compat/auth result and the interaction with the existing auth state subscription; done means redirect sign-in returns credentials and a user without relying on signInWithPopup().

由索引模型根據 Issue 內容生成。

評估

技術堆疊
angular, firebase, typescript
領域
authentication, frontend
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。