firebase / firebase/firebaseui-web-react

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

未关闭
#91 6 条评论 12 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
1.3k
派生
246
PR 合并指标
30 天内没有已合并 PR

描述

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 ?

贡献指南

打开贡献指南

调研方向

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.

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, react
领域
authentication
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。