Skip to content

Commit 1528dbc

Browse files
committed
refactor(auth_service): remove code clearing logic for deleteUser
- Removed the section that cleared pending verification codes for linking - Retained the logic for clearing pending sign-in codes for the user's email - Updated the step numbering accordingly
1 parent 851ccfc commit 1528dbc

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

lib/src/services/auth_service.dart

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -404,18 +404,7 @@ class AuthService {
404404
await _userRepository.delete(id: userId);
405405
_log.info('User ${userToDelete.id} deleted from repository.');
406406

407-
// 3. Clear any pending verification codes for this user ID (linking).
408-
try {
409-
await _verificationCodeStorageService.clearLinkCode(userId);
410-
_log.info('Cleared link code for user ${userToDelete.id}.');
411-
} catch (e) {
412-
// Log but don't fail deletion if clearing codes fails
413-
_log.warning(
414-
'Warning: Failed to clear link code for user ${userToDelete.id}: $e',
415-
);
416-
}
417-
418-
// 4. Clear any pending sign-in codes for the user's email.
407+
// 3. Clear any pending sign-in codes for the user's email.
419408
try {
420409
await _verificationCodeStorageService.clearSignInCode(
421410
userToDelete.email,

0 commit comments

Comments
 (0)