unregisterDevice abstract method
Removes the current device registration from Firestore.
Called BEFORE logout while still authenticated, via the
addOnAboutToLogOutCallback hook. Deletes the device document
at users/{uid}/devices/{deviceId}.
Important
- Must be called while still authenticated (before sign out)
- Best-effort and timeboxed; must never block logout
- If offline, staleness cleanup will handle orphaned docs
When Called
- Automatically via
AuthServiceInt.addOnAboutToLogOutCallback - Should not be called manually in most cases
Returns
Right(unit)on successLeft(RepositoryFailure)on failure (logged, doesn't block logout)
Implementation
Future<Either<RepositoryFailure, Unit>> unregisterDevice();