Clean localstorage before renew access token (cause: expired)

Hi,
when my access token is expired, the sdk call a new token via /token.
In my localstorage i’ve the keyname “foo” with value “bar”

Is there a way to clean the localstorage “foo” before the sdk ask call a new token ?