nuxt-community / firebase-module

🔥 Easily integrate Firebase into your Nuxt project. 🔥
https://firebase.nuxtjs.org
MIT License
641 stars 98 forks source link

Correctly register idTokenChanged callback #508

Closed BboyKeen closed 3 years ago

BboyKeen commented 3 years ago

Hi there,

It looks like the callback for idTokenChanged was naively introduced in the module in this commit https://github.com/nuxt-community/firebase-module/commit/fcf08463621b36e597dc31d9c542c46632a5beb9#diff-3d37c994b7571c62b0cfb339a4994a7ee10e263b6c6216a3d7b0b19516f52b1d

If both authStateChanged and idTokenChanged callbacks are used, the first return prevents the second callback to be registered so the Firebase update is never propagated.

With this PR, this problem should be fixed. Feel free to ask me to update it if necessarily.

lupas commented 3 years ago

Hey @BboyKeen

Please excuse the late response, buys times. Thanks a lot for you contribution, that makes sense! Just merged and will release in the next version.

Appreciate your contribution!

Best regards Pascal

BboyKeen commented 3 years ago

You're welcome :)

lupas commented 3 years ago

Published with v7.6.1