How to list all active firebase ci tokens, or revoke them all

大兔子大兔子 提交于 2019-12-08 02:04:37

问题


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.


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/38060188/how-to-list-all-active-firebase-ci-tokens-or-revoke-them-all

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!