Clear All Sessions
You can remove all locally stored Suki sessions from the device by calling theclear() method.
The primary use case for this method is to clear user-specific data when a user signs out of your application. This ensures data privacy and prepares the SDK for a new user session.
Do not call the
clear() method during an active session; this will throw an error.FAQs
Why can't I call the `clear()` method during an active session?
Why can't I call the `clear()` method during an active session?
The
clear() method is used to clear all locally stored Suki sessions from the device. If you call this method during an active session, it will throw an error.`clear()` method is not working
`clear()` method is not working
The
clear() method is not working because the SDK is not initialized. You must ensure that the SDK is initialized before calling the clear() method.How do I know if the `clear()` method has been called?
How do I know if the `clear()` method has been called?
You can check the
sessionState property to determine the current state of the session.`clear()` method is clearing all sessions but the data is not being deleted
`clear()` method is clearing all sessions but the data is not being deleted
The data is not being deleted because the SDK is not initialized. You must ensure that the SDK is initialized before calling the
clear() method.How to Initialize the SDK?
How to Initialize the SDK?
You can initialize the SDK by calling the
initialize() method.