angular / angular/angularfire

getRedirectResult() always returns null (AF7+FB9)

オープン
#3,208 コメント 9 件 リアクション 7 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
7.8k
フォーク
2.2k
平均マージ
22時間 28分
マージ済み PR(30日)
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 を短くまとめたダイジェスト。