Account deletion
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user