firebase-tools
firebase-tools copied to clipboard
getIdToken(true) is not returning a new token
[REQUIRED] Environment info
firebase-tools: 11.5.0
Platform: Windows 10
Node: 14.20.0
[REQUIRED] Test case
let token1 = await firebase.auth().currentUser.getIdToken(true)
await firebase.auth().currentUser.updateEmail("[email protected]")
let token2 = await firebase.auth().currentUser.getIdToken(true)
token1 == token2
[REQUIRED] Steps to reproduce
On localhost, against the Auth emulators:
- In a Firebase project with firebase Auth working, authenticate with phone
- Invoke the getIdToken(true) to force refresh the token
- Update e-mail (which forces token to be revoked)
- Invoke the getIdToken(true) to force refresh the token
[REQUIRED] Expected behavior
- Being able to retrieve a new valid token as the old one had been revoked by e-mail update
[REQUIRED] Actual behavior
Code running on emulator:
Code running on firebase production:
The same is happening here, but I use the macOS plataform
I'm on macOS, firebase-tools v11.5.0, node 14 and using JSSDK v9 (it seems like you're using v8 based on the syntax and that I know of, the refresh logic hasn't changed significantly since v8), but unfortunately, I'm not able to reproduce this.
Could I get a bit more information about how you're doing phone auth? Are you also seeing any errors in your console when you did any of the steps (e.g. during phone auth, while refreshing the token, etc)?
Hey @octaviodivy. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@octaviodivy if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.
Have the same issue without an emulator
Having same issue here. Token is revoked and I cant generate new ones
Hi folks. If you are seeing similar issue, please feel free to file a new issue. Would appreciate if you can include reproduction steps or firebase debug logs along with the issue. Thanks.