Account deletion

This commit is contained in:
2026-04-09 23:18:31 -05:00
parent f678e36584
commit ccaf0e179f
2 changed files with 46 additions and 0 deletions

View File

@@ -200,6 +200,14 @@ public final class AuthClient: Sendable {
return user
}
// MARK: - Delete Account
/// Permanently delete the user's account and all associated data.
public func deleteAccount() async throws {
_ = try await api.postRaw("/api/account/delete", body: EmptyBody())
api.clearSessionCookies()
}
// MARK: - Sign Out
/// Sign out. Clears the session cookie.