Skip to main content
Resets the current user session by clearing the user ID and all cached entitlements. Call this when a user logs out to ensure the next user session starts fresh with a new anonymous ID.

Signature

fun reset()

Parameters

This method takes no parameters.

Usage

Basic logout flow

fun handleLogout() {
    // Clear your app's session data
    authService.logout()

    // Reset Encore to clear user ID and entitlements
    Encore.shared.reset()

    // Navigate to login screen
    navigateToLogin()
}
After calling reset(), the SDK automatically generates a new anonymous user ID. You don’t need to call configure() again.