16

I realize you can create a firebase token by using

firebase login:ci

You can revoke an individual token by doing

firebase logout --token <token>

But how do you either a) revoke all of them, or b) list all the active tokens?

I want to make sure there aren't leftover tokens that are still active on a project.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Qiming
  • 1,664
  • 1
  • 14
  • 18

2 Answers2

14

These tokens are Google OAuth2 refresh tokens (see bullet 4 in Google Identity Platform). Their number is limited (i guess it is 25 ).

The easiest way to explicitly revoke a token is to use firebase logout --token <token> as you mentioned. I do not know of an API for listing outstanding refresh tokens, I'm not sure it exists.

But I do know that clicking 'Remove' on the Firebase CLI entry here: https://myaccount.google.com/permissions will revoke the active tokens.

Logging back in will prompt you for permissions again and if you grant them your new token will be the only valid one.

So, It's better to remove permission from your App permissions, so no leftover tokens are there on your project.

Kariem
  • 4,398
  • 3
  • 44
  • 73
Ravi Shankar Bharti
  • 8,922
  • 5
  • 28
  • 52
3

You should test this before I'd be certain it works, but you can likely go to Apps connected to your account for your Google account and revoke access to the Firebase CLI app. This should immediately revoke any outstanding tokens, and you can then run firebase login again to re-authenticate yourself.

Michael Bleigh
  • 25,334
  • 2
  • 79
  • 85