Clears access and refresh tokens from secure storage during logout
or when authentication needs to be reset. Dynamically imports the
token module to avoid circular dependencies.
This function:
Clears tokens from memory state
Removes tokens from secure persistent storage
Resets the Spotify API module state
Logs the action for debugging purposes
Handles all cleanup errors gracefully
Returns Promise<void>
Promise resolving when tokens are successfully cleared
Example
// Clear tokens during logout logoutButton.addEventListener('click', async () => { awaitclearTokens(); showLoginScreen(); displayMessage("You have been logged out successfully"); });
Removes all stored authentication tokens
Clears access and refresh tokens from secure storage during logout or when authentication needs to be reset. Dynamically imports the token module to avoid circular dependencies.
This function: