Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onIdTokenChanged is called with no reason #629

Open
sl0wik opened this issue Jun 24, 2022 · 0 comments
Open

onIdTokenChanged is called with no reason #629

sl0wik opened this issue Jun 24, 2022 · 0 comments

Comments

@sl0wik
Copy link

sl0wik commented Jun 24, 2022

I'm fighting with this weird, hard-to-reproduce bug where firebase gets into endless loop of a token refresh.

Version

@nuxtjs/firebase: 8.2.2
firebase: 9.6.7
nuxt: 2.15.8

Steps to reproduce

It happened after:

  1. Login using app.$fire.auth.signInWithCustomToken().
  2. Refresh the page. onIdTokenChanged is being called twice. The second time by asyncToGenerator.
  3. Open a new tab with the same page. Both pages will get into endless loop of onIdTokenChanged calls.

What is Expected?

onIdTokenChanged happens only once when the page id is loaded, and onIdTokenChanged is not triggered when the page is opened in another tab.

What is actually happening?

onIdTokenChanged is getting refreshed a second time for no reason, and when the page is opened in two tabs it causes an endless loop of token refreshing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant