How to remove all refresh tokens at once

Like most of us I have an ever growing list of login refresh tokens for home assistant. Every time I don’t logout it keeps one more. How can I remove them all at once? Or even better how can I remove them after they weren’t sed for x days automatically?

There are long life tokens (10 years), how long are those refreshing tokens stay there?

1 Like

At the very bottom of the list there is an option to delete all token. However, if you do that, afterwards you may get an error

"Login attempt or request with invalid authentication from <device_name>"

You can still log in but the error occurs every time you authenticate.

1 Like

I was looking for this a long time! How did I miss that, Is it a new option? I had gazillion refresh tokens, so I was happy to push the button!

One warning though, it also deletes all Long-lived access tokens

.
These login warnings started to occur right away and are a pain… and plain weird.

The auth warnings seems to come from components.http.ban according to the log:
Screenshot from 2024-01-04 23-45-01

.
Possible ‘Fix’, found at https://www.home-assistant.io/integrations/http
Add these lines to your configuration.yaml

http:
  ip_ban_enabled: false

Not sure if this is a good idea though, regarding safety