firebase / firebase/firebaseui-web-react

uiconfig.callbacks are not called for email link sign in method if onAuthStateChanged listener is registered

Đang mở
#91 6 bình luận 12 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
1.3k
Fork
246
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

I am using provider: EmailAuthProvider.PROVIDER_ID with EmailAuthProvider.EMAIL_LINK_SIGN_IN_METHOD and flow = redirect. I register a listener for onAuthStateChanged in componentDidMount and I have
```
uiconfig = {
callbacks: {
signInSuccessWithAuthResult: function(authResult, redirectUrl){
console.log("called success callback");
return false;
}
}
}
```
(other parts of config skipped for brevity)
The onAuthStateChanged listener will be called but the signInSuccessWithAuthResult callback will not. If I get rid of the listener, the callback is hit. This issue only applies to email link sign in- google, facebook, etc[ work fine and call both the listener and the callback.

I need the signInSuccessWithAuthResult callback to take actions that need to happen only once on signup, rather than every time the user logs in/refreshes the page, which is what onAuthStateChanged would get me.

@jhuleatt @wti806 This seems like it might be related to these other issues issues: #67 or https://github.com/firebase/firebaseui-web/issues/656 any thoughts?

@dankawka maybe related to the issue you called in #67 ?

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

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

Hướng nghiên cứu

Reproduce the email-link redirect flow with an onAuthStateChanged listener and the shown uiconfig.callbacks configuration, then compare it with the flow without the listener. Trace the React wrapper's FirebaseUI integration to find where the success callback is bypassed; done means the callback is invoked alongside the auth-state listener for email-link sign-in without changing other providers.

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

Đánh giá

Công nghệ
javascript, react
Lĩnh vực
authentication
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/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.