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

Sometimes old AppCheck tokens continue to be returned. #6734

Closed
ishowta opened this issue Oct 28, 2022 · 2 comments · Fixed by #6740
Closed

Sometimes old AppCheck tokens continue to be returned. #6734

ishowta opened this issue Oct 28, 2022 · 2 comments · Fixed by #6740

Comments

@ishowta
Copy link

ishowta commented Oct 28, 2022

[REQUIRED] Describe your environment

  • Operating System version: _____
  • Browser version: _____
  • Firebase SDK version: 9.12.0
  • Firebase Product: appcheck

[REQUIRED] Describe the problem

If certain conditions are met, even if getToken is executed with forceRefresh, getToken will only return the same token, and if more than 1 hour, the token's expiration time, elapses, the application will crash due to the token expiration.
It is a small project, but according to sentry it appears to be occurring several times a day.

Debugging the internal code showed that the exchangeTokenPromise doesn't cleared and kept returning the exchangeTokenPromise return value.

related pull request: #6617

Translated with www.DeepL.com/Translator (free version)

Steps to reproduce:

Relevant Code:

// TODO(you): code here to reproduce the problem
@google-oss-bot
Copy link
Contributor

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@hsubox76
Copy link
Contributor

Thanks for figuring this out and providing a solution. Let me look into it and see if that's the best solution or if there's a simpler option. Either way we'll try to get a fix out next release.

@firebase firebase locked and limited conversation to collaborators Dec 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants