clearLocalStorage
Last updated
Was this helpful?
Removes all Stacks Connect data from local storage. This clears the cached addresses stored under the @stacks/connect key.
import { clearLocalStorage } from '@stacks/connect';
clearLocalStorage();After calling this function, isConnected will return false and getLocalStorage will return null.
If you want to fully disconnect a user (including clearing the selected wallet provider and session data), use disconnect instead, which calls clearLocalStorage internally.
If removing from local storage fails, a warning is logged to the console and no error is thrown.
function clearLocalStorage(): voidvoid
This function does not return a value.
This function takes no parameters.
Last updated
Was this helpful?
Was this helpful?