firebase / firebase/firebase-tools
requireAuth does not properly handle invalidated token
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.3k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 84
Description
### [REQUIRED] Environment info
**firebase-tools:** all
**Platform:** all
### [REQUIRED] Test case
Googler's need to run `firebase login --reauth` every day. However `requireAuth` only checks if `configstore` has a `user` entry, not if the tokens are still valid.
The result is when you run `firebase init emulators` or any other auth command you get:
```
Error: Failed to list Firebase projects. See firebase-debug.log for more info.
```
It would be good if `getAccessToken()` or other auth base functions could detect invalid auth.
### [REQUIRED] Steps to reproduce
See above
### [REQUIRED] Expected behavior
See above
### [REQUIRED] Actual behavior
See above
Contributor guide
Assessment
This issue has not been assessed yet.