angular / angular/angularfire

getRedirectResult() always returns null (AF7+FB9)

Đang mở
#3,208 9 bình luận 7 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
7.8k
Fork
2.2k
Merge trung bình
22 giờ 28 phút
Pull request đã merge (30 ngày)
6

Mô tả

### 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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

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().

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
angular, firebase, typescript
Lĩnh vực
authentication, frontend
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.