handleAboutToLogOut abstract method
Public handler for pre-logout cleanup.
This method can be passed to AuthService constructor for race-free initialization. It unregisters the device before logout completes.
Usage
// Race-free initialization pattern:
final deviceService = DeviceServiceImpl();
final auth = AuthServiceImpl(
firebaseApp: app,
onAboutToLogOutCallbacks: [deviceService.handleAboutToLogOut],
);
Behavior
Calls unregisterDevice to delete the device document from Firestore. This is best-effort and should never block logout.
Implementation
Future<void> handleAboutToLogOut();