# invalidate

The invalidate() method for the SurrealDB Swift SDK clears the connection's authentication state.

Invalidates the authentication for the current connection.

```swift title="Method Syntax"
try await client.invalidate()
```

## Example usage

```swift
try await client.invalidate()
```
