removeSession method

Future<void> removeSession(
  1. AuthSession session
)

Remove a session from the manager

Implementation

Future<void> removeSession(AuthSession session) async {
  await _isar.writeTxn(() async {
    await _isar.authSessions.delete(session.isarId);
  });

  // If the removed session was the current session, clear it
  if (_currentSession?.id == session.id) {
    await switchSession(null);
  }
}