For AI agents: a documentation index is available at /llms.txt. A markdown version of this page is available at the same URL with .md appended (or via Accept: text/markdown).
Skip to main content

Logging out a user

Logging out your user is as simple as calling the logout method. This method invalidates the user's session, clears the stored Auth tokens and session data on the device, and signs the user out.

logout returns a CompletableFuture<Void>. The future completes after the local session data is cleared, even if invalidating the session on the server fails.

Usage​

val logoutCompletableFuture = web3Auth.logout()

logoutCompletableFuture.whenComplete { _, error ->
if (error == null) {
// Render the signed-out UI
} else {
Log.d("MainActivity_Web3Auth", error.message ?: "Something went wrong")
}
}
On this page