> This page is for version V3 - Beta (default).
> For other versions, use one of these documentation indexes:
> - V3 - Beta (default): https://docs.authlyx.dev/v3/llms.txt
> - V2 - Legacy: https://docs.authlyx.dev/v2/llms.txt
> - V1 - End of support: https://docs.authlyx.dev/v1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.authlyx.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.authlyx.dev/_mcp/server.

# Sign out

> End the current session and clear the signed-in identity.

Call Sign Out when the user chooses to leave the account. The SDK ends the server session, stops its heartbeat and clears current user data. Keep the application open and return to your own sign-in screen.

**SDK version:** V3 Beta. These examples use the current downloads. V1 and V2 use different APIs; choose them in the version selector.

Each example assumes `app` is the AuthlyX client you created in [Connect your app](/guides/quickstart). When a method takes a callback, AuthlyX calls it after the reply arrives. A name such as `result` inside that callback is created there; you do not declare it at the top of your file. For C++ futures, Python or JavaScript `await`, Java futures, Go errors and Rust `?`, read [Results](/sdks/methods/results).

#### C\#

```csharp
app.logout(result =>
{
    Console.WriteLine(result.ok ? "Signed out" : result.message);
});
```

#### C++

```cpp
auto result = app.logout().get();
std::cout << (result.ok() ? "Signed out" : result.message) << '\n';
```

#### Python

```python
async def sign_out():
    result = await app.logout()
    print("Signed out" if result.ok else result.message)
```

#### JavaScript / Node.js

```javascript
const result = await app.logout();
console.log(result.ok ? "Signed out" : result.message);
```

#### TypeScript

```typescript
const result = await app.logout();
console.log(result.ok ? "Signed out" : result.message);
```

#### Java

```java
app.logout().thenRun(() -> System.out.println("Signed out"));
```

#### Go

```go
err := app.Logout(ctx)
if err != nil {
    return err
}
fmt.Println("Signed out")
```

#### Rust

```rust
app.logout().await?;
println!("Signed out");
```

Rust's `logout` returns `Result<(), Error>` rather than a response containing a message. If `.await?` completes, the request succeeded; if it returns an error, Rust passes that error to the calling function.

Dispose or close the SDK when the application itself shuts down. Sign Out is for ending a user's session; Close is for stopping the SDK client.