I'm not convinced that onIdTokenChanged() is working either as documented, as the function name suggests, or as we think it should be. Apologies if it is the latter, and this is my misunderstanding of the function name.
When a user signs in, signs out, or when the browser is refreshed. The auth event is triggered and everything works as intended.
However, when the token expires after (correct me if I am wrong), one hour, the trigger is not met. Should the
Steps and code to reproduce issue
Essentially add the following subscription handler for an auth token "change", anywhere in your app:
Thanks @michealroberts for reporting the advice. As you can find here, this works as intended. The token itself remains unchanged while it becomes expired because of the time change.
Operating System
macOS v12.6.8
Browser Version
Version 119.0.6045.123 (Official Build) (arm64)
Firebase SDK Version
10.6.0
Firebase SDK Product:
Auth
Describe your project's tooling
TypeScript, Vite & Vue 3 Composition API
Describe the problem
I'm not convinced that
onIdTokenChanged()
is working either as documented, as the function name suggests, or as we think it should be. Apologies if it is the latter, and this is my misunderstanding of the function name.When a user signs in, signs out, or when the browser is refreshed. The auth event is triggered and everything works as intended.
However, when the token expires after (correct me if I am wrong), one hour, the trigger is not met. Should the
Steps and code to reproduce issue
Essentially add the following subscription handler for an auth token "change", anywhere in your app:
However, when the user's token actually expires, it does not seem to trigger any sort of refresh or event that the name of this function suggests ...