When someone leaves
When an account is closed, delete the user in Tenon-Auth too. This deletes:
- their methods, phones and recovery codes;
- their sign-in requests and remembered devices.
The audit log keeps its events, which name the user only by Tenon-Auth’s ID. Your external ID can be used again later for a new, separate user.
User user = tenonAuth.findUser(account.id()); // null: Tenon-Auth never knew themif (user != null) tenonAuth.deleteUser(user.id());const user = await tenonAuth.findUser(account.id);if (user) await tenonAuth.deleteUser(user.id);user = tenon_auth.find_user(str(account.id))if user: tenon_auth.delete_user(user.id)var user = await tenonAuth.FindUserAsync(account.Id.ToString());if (user != null) await tenonAuth.DeleteUserAsync(user.Id);findUser never creates a user, unlike createUser.