logout

fun logout(cleanupFn: (DittoBase) -> Unit? = null)

Log out of Ditto.

This will stop sync, shut down all replication sessions, and remove any cached authentication credentials. Note that this does not remove any data from the store. If you wish to delete data from the store then use the optional cleanupFn parameter to perform any required cleanup.

Parameters

cleanupFn

An optional function that will be called with the relevant DittoBase instance as the sole argument that allows you to perform any required cleanup of the store as part of the logout process.


fun logout(cleanupFn: DittoLogoutCleanupFn)

Log out of Ditto.

This will stop sync, shut down all replication sessions, and remove any cached authentication credentials. Note that this does not remove any data from the store. If you wish to delete data from the store then use the optional cleanupFn parameter to perform any required cleanup.

Parameters

cleanupFn

an object that implements the DittoLogoutCleanupFn interface, whose cleanup function will be called with the relevant Ditto instance as the sole argument that allows you to perform any required cleanup of the store as part of the logout process.