firebase / firebase/firebaseui-web-react

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

Abierto
#91 6 comentarios 12 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
1.3k
Forks
246
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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 ?

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.