The Admin profile Refresh tokens get filled up with state Tokens . It’s a pain to delete them manually . Can we mark them for deletion and delete them in one go, rather than delete , are you sure for each one ?
Yeah or some sort of cleanup after x days of not being
I have more than 160 refresh tokens and some are 8 months old… Want to remove them easy and quick to clean up
What I’m seeing here is that clients running in Virtual Machine’s tend to leave orphaned refresh tokens behind, this despite my being diligent about cleanly signing out from HA in each of the browser session(s) of the VM(s) before shutting down the VM’s.
Also the way that the VM networking is configured, the sessions all use the host OS IP. Which by itself is not a problem. But I do wonder if that is aggravating the accumulation of refresh tokens problem.
I’d say an algorithm that deletes orphaned or stale tokens after some configurable period of time would be a great enhancement. In my case any refresh token not reused within 7-14 days is most likely orphaned and should be deleted.
I have other tokens that were created more than a year ago that are used regularly and are fine. It is primarily the ones created from within VM browser sessions that are problematic with becoming orphaned.
Edit to add for more clarification (and fix grammar / typos):
A key component of an auto deletion algorithm would be to only automatically delete old refresh tokens based on when they were last used, and not simply based on their creation age.
In my example I end up with a bunch of refresh tokens linked to the same IP address, which is the IP of the Virtual Machine(s) host. So I know that all refresh tokens associated to that IP, and that are not “new”, are actually stale or orphaned.
Removed many old tokens some weeks ago. After that my Alexa integrations and skills went broken. Some tokens are created because Alexa also login. It’s almost impossible to find the token that is used by Alexa to exclude this one from deletion. So I keep all my tokens… Better then struggle for days to connect Alexa skills again. Haha